diff options
author | Larry Hastings <larry@hastings.org> | 2013-09-30 00:13:32 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2013-09-30 00:13:32 (GMT) |
commit | d92af0f1d9087c3526ac470dafec1449404e40f9 (patch) | |
tree | 34352ef08a7b007967c12f7f2db01dfc1c469d46 /Lib/distutils | |
parent | e9cbd181a20c667c7eda7c22774696501cfdc0f1 (diff) | |
parent | 5d23e6d54352db7c64d152dbabef798340127ccb (diff) | |
download | cpython-d92af0f1d9087c3526ac470dafec1449404e40f9.zip cpython-d92af0f1d9087c3526ac470dafec1449404e40f9.tar.gz cpython-d92af0f1d9087c3526ac470dafec1449404e40f9.tar.bz2 |
Merge 3.4.0a3 release changes.
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/command/build_ext.py | 7 | ||||
-rw-r--r-- | Lib/distutils/tests/test_cmd.py | 25 |
2 files changed, 15 insertions, 17 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index a6aad53..80689b6 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -242,11 +242,10 @@ class build_ext(Command): # building python standard extensions self.library_dirs.append('.') - # for extensions under Linux or Solaris with a shared Python library, + # For building extensions with a shared Python library, # Python's library directory must be appended to library_dirs - sysconfig.get_config_var('Py_ENABLE_SHARED') - if (sys.platform.startswith(('linux', 'gnu', 'sunos')) - and sysconfig.get_config_var('Py_ENABLE_SHARED')): + # See Issues: #1600860, #4366 + if (sysconfig.get_config_var('Py_ENABLE_SHARED')): if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) diff --git a/Lib/distutils/tests/test_cmd.py b/Lib/distutils/tests/test_cmd.py index 195045c..cf5197c 100644 --- a/Lib/distutils/tests/test_cmd.py +++ b/Lib/distutils/tests/test_cmd.py @@ -34,6 +34,18 @@ class CommandTestCase(unittest.TestCase): self.assertRaises(DistutilsOptionError, cmd.ensure_string_list, 'not_string_list2') + cmd.option1 = 'ok,dok' + cmd.ensure_string_list('option1') + self.assertEqual(cmd.option1, ['ok', 'dok']) + + cmd.option2 = ['xxx', 'www'] + cmd.ensure_string_list('option2') + + cmd.option3 = ['ok', 2] + self.assertRaises(DistutilsOptionError, cmd.ensure_string_list, + 'option3') + + def test_make_file(self): cmd = self.cmd @@ -77,19 +89,6 @@ class CommandTestCase(unittest.TestCase): cmd.option3 = 1 self.assertRaises(DistutilsOptionError, cmd.ensure_string, 'option3') - def test_ensure_string_list(self): - cmd = self.cmd - cmd.option1 = 'ok,dok' - cmd.ensure_string_list('option1') - self.assertEqual(cmd.option1, ['ok', 'dok']) - - cmd.option2 = ['xxx', 'www'] - cmd.ensure_string_list('option2') - - cmd.option3 = ['ok', 2] - self.assertRaises(DistutilsOptionError, cmd.ensure_string_list, - 'option3') - def test_ensure_filename(self): cmd = self.cmd cmd.option1 = __file__ |