Commit 387bb1d4 authored by Larry Hastings's avatar Larry Hastings

Merge 3.4.0a3 release changes.

parents d30e0573 c8c3deff
...@@ -242,11 +242,10 @@ class build_ext(Command): ...@@ -242,11 +242,10 @@ class build_ext(Command):
# building python standard extensions # building python standard extensions
self.library_dirs.append('.') 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 # Python's library directory must be appended to library_dirs
sysconfig.get_config_var('Py_ENABLE_SHARED') # See Issues: #1600860, #4366
if (sys.platform.startswith(('linux', 'gnu', 'sunos')) if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
and sysconfig.get_config_var('Py_ENABLE_SHARED')):
if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
# building third party extensions # building third party extensions
self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
......
...@@ -34,6 +34,18 @@ class CommandTestCase(unittest.TestCase): ...@@ -34,6 +34,18 @@ class CommandTestCase(unittest.TestCase):
self.assertRaises(DistutilsOptionError, self.assertRaises(DistutilsOptionError,
cmd.ensure_string_list, 'not_string_list2') 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): def test_make_file(self):
cmd = self.cmd cmd = self.cmd
...@@ -77,19 +89,6 @@ class CommandTestCase(unittest.TestCase): ...@@ -77,19 +89,6 @@ class CommandTestCase(unittest.TestCase):
cmd.option3 = 1 cmd.option3 = 1
self.assertRaises(DistutilsOptionError, cmd.ensure_string, 'option3') 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): def test_ensure_filename(self):
cmd = self.cmd cmd = self.cmd
cmd.option1 = __file__ cmd.option1 = __file__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment