mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Merged revisions 77704,77752 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77704 | tarek.ziade | 2010-01-23 10:23:15 +0100 (Sat, 23 Jan 2010) | 1 line taking sysconfig out of distutils ........ r77752 | tarek.ziade | 2010-01-26 00:19:56 +0100 (Tue, 26 Jan 2010) | 1 line switched the call order so this call works without suffering from issue #7774 ........
This commit is contained in:
parent
82b8398583
commit
edacea30e4
35 changed files with 1193 additions and 926 deletions
|
@ -9,7 +9,7 @@ from test.support import captured_stdout
|
|||
|
||||
from distutils.core import Extension, Distribution
|
||||
from distutils.command.build_ext import build_ext
|
||||
from distutils import sysconfig
|
||||
import sysconfig
|
||||
from distutils.tests.support import TempdirManager
|
||||
from distutils.tests.support import LoggingSilencer
|
||||
from distutils.extension import Extension
|
||||
|
@ -105,17 +105,17 @@ class BuildExtTestCase(TempdirManager,
|
|||
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
|
||||
from 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']
|
||||
del _CONFIG_VARS['Py_ENABLE_SHARED']
|
||||
else:
|
||||
_config_vars['Py_ENABLE_SHARED'] = old_var
|
||||
_CONFIG_VARS['Py_ENABLE_SHARED'] = old_var
|
||||
|
||||
# make sure we get some library dirs under solaris
|
||||
self.assertTrue(len(cmd.library_dirs) > 0)
|
||||
|
@ -177,11 +177,10 @@ class BuildExtTestCase(TempdirManager,
|
|||
cmd = build_ext(dist)
|
||||
cmd.finalize_options()
|
||||
|
||||
from distutils import sysconfig
|
||||
py_include = sysconfig.get_python_inc()
|
||||
py_include = sysconfig.get_path('include')
|
||||
self.assertTrue(py_include in cmd.include_dirs)
|
||||
|
||||
plat_py_include = sysconfig.get_python_inc(plat_specific=1)
|
||||
plat_py_include = sysconfig.get_path('platinclude')
|
||||
self.assertTrue(plat_py_include in cmd.include_dirs)
|
||||
|
||||
# make sure cmd.libraries is turned into a list
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue