summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-02-05 22:56:14 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-02-05 22:56:14 (GMT)
commit5874ef16edfa34cf6ff184e56ada8b78687b689f (patch)
treef2fddd33f1bce679dbfa04cfa1d08a42d30f9187 /Lib/distutils/tests
parent48f5c4eec6c85b5c91e8d45921afe8d62410239b (diff)
downloadcpython-5874ef16edfa34cf6ff184e56ada8b78687b689f.zip
cpython-5874ef16edfa34cf6ff184e56ada8b78687b689f.tar.gz
cpython-5874ef16edfa34cf6ff184e56ada8b78687b689f.tar.bz2
Merged revisions 69316 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r69316 | tarek.ziade | 2009-02-05 23:52:52 +0100 (Thu, 05 Feb 2009) | 1 line Fixed #5132: enable extensions to link on Solaris ........
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r--Lib/distutils/tests/test_build_ext.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py
index 5275297..4c57232 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -75,6 +75,27 @@ class BuildExtTestCase(unittest.TestCase):
# XXX on Windows the test leaves a directory with xx module in TEMP
shutil.rmtree(self.tmp_dir, os.name == 'nt' or sys.platform == 'cygwin')
+ def test_solaris_enable_shared(self):
+ dist = Distribution({'name': 'xx'})
+ cmd = build_ext(dist)
+ old = sys.platform
+
+ sys.platform = 'sunos' # fooling finalize_options
+ from distutils.sysconfig import _config_vars
+ old_var = _config_vars.get('Py_ENABLE_SHARED')
+ _config_vars['Py_ENABLE_SHARED'] = 1
+ try:
+ cmd.ensure_finalized()
+ finally:
+ sys.platform = old
+ if old_var is None:
+ del _config_vars['Py_ENABLE_SHARED']
+ else:
+ _config_vars['Py_ENABLE_SHARED'] = old_var
+
+ # make sur we get some lobrary dirs under solaris
+ self.assert_(len(cmd.library_dirs) > 0)
+
def test_suite():
if not sysconfig.python_build:
if support.verbose: