| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b445262 commit 5985ddc
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -231,10 +231,12 @@ def finalize_options (self): | |||
| 231 | 231 | # building python standard extensions | |
| 232 | 232 | self.library_dirs.append('.') | |
| 233 | 233 | ||
| 234 | - # for extensions under Linux with a shared Python library, | ||
| 234 | + # for extensions under Linux or Solaris with a shared Python library, | ||
| 235 | 235 | # Python's library directory must be appended to library_dirs | |
| 236 | - if (sys.platform.startswith('linux') or sys.platform.startswith('gnu')) \ | ||
| 237 | - and sysconfig.get_config_var('Py_ENABLE_SHARED'): | ||
| 236 | + sysconfig.get_config_var('Py_ENABLE_SHARED') | ||
| 237 | + if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu') | ||
| 238 | + or sys.platform.startswith('sunos')) | ||
| 239 | + and sysconfig.get_config_var('Py_ENABLE_SHARED')): | ||
| 238 | 240 | if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): | |
| 239 | 241 | # building third party extensions | |
| 240 | 242 | self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -67,6 +67,27 @@ def tearDown(self): | |||
| 67 | 67 | # XXX on Windows the test leaves a directory with xx module in TEMP | |
| 68 | 68 | shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin') | |
| 69 | 69 | ||
| 70 | + def test_solaris_enable_shared(self): | ||
| 71 | + dist = Distribution({'name': 'xx'}) | ||
| 72 | + cmd = build_ext(dist) | ||
| 73 | + old = sys.platform | ||
| 74 | + | ||
| 75 | + sys.platform = 'sunos' # fooling finalize_options | ||
| 76 | + from distutils.sysconfig import _config_vars | ||
| 77 | + old_var = _config_vars.get('Py_ENABLE_SHARED') | ||
| 78 | + _config_vars['Py_ENABLE_SHARED'] = 1 | ||
| 79 | + try: | ||
| 80 | + cmd.ensure_finalized() | ||
| 81 | + finally: | ||
| 82 | + sys.platform = old | ||
| 83 | + if old_var is None: | ||
| 84 | + del _config_vars['Py_ENABLE_SHARED'] | ||
| 85 | + else: | ||
| 86 | + _config_vars['Py_ENABLE_SHARED'] = old_var | ||
| 87 | + | ||
| 88 | + # make sur we get some lobrary dirs under solaris | ||
| 89 | + self.assert_(len(cmd.library_dirs) > 0) | ||
| 90 | + | ||
| 70 | 91 | def test_suite(): | |
| 71 | 92 | src = _get_source_filename() | |
| 72 | 93 | if not os.path.exists(src): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -149,6 +149,9 @@ Core and Builtins | |||
| 149 | 149 | Library | |
| 150 | 150 | ------- | |
| 151 | 151 | ||
| 152 | + - Issue #5132: Fixed trouble building extensions under Solaris with | ||
| 153 | + --enabled-shared activated. Initial patch by Dave Peterson. | ||
| 154 | + | ||
| 152 | 155 | - Issue #1581476: Always use the Tcl global namespace when calling into Tcl. | |
| 153 | 156 | ||
| 154 | 157 | - Issue #2047: shutil.move() could believe that its destination path was | |
| Back | FazBrowse Home | New Git URL |
0 commit comments