summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests/test_build_ext.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-08-23 23:29:10 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-08-23 23:29:10 (GMT)
commit175eb995d342ebdffb7f56d106fd47e7253a043a (patch)
tree24bd6cab5ef1ead31f82730cd385ec8c7755bcc8 /Lib/distutils/tests/test_build_ext.py
parent7a084105a0ebd0b309ef9b036e9d7922d6c0c555 (diff)
downloadcpython-175eb995d342ebdffb7f56d106fd47e7253a043a.zip
cpython-175eb995d342ebdffb7f56d106fd47e7253a043a.tar.gz
cpython-175eb995d342ebdffb7f56d106fd47e7253a043a.tar.bz2
Fix distutils tests on Windows (#12678).
- First, support.fixup_build_ext (already used to set proper library_dirs value under Unix shared builds) gains the ability to correctly set the debug attribute under Windows debug builds. - Second, the filename for the extension module gets a _d suffix under debug builds. - Third, the test code properly puts our customized build_ext object into an internal dictionary to make sure that the install command will later use our object instead of re-creating one. That’s the downside of using low-level APIs in our test code: we have to manually push knobs and turn handles that would otherwise be handled behind the scenes. Thanks to Nadeem for the testing.
Diffstat (limited to 'Lib/distutils/tests/test_build_ext.py')
-rw-r--r--Lib/distutils/tests/test_build_ext.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py
index 8eb59b4..1827437 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -47,10 +47,6 @@ class BuildExtTestCase(TempdirManager,
dist.package_dir = self.tmp_dir
cmd = build_ext(dist)
fixup_build_ext(cmd)
- if os.name == "nt":
- # On Windows, we must build a debug version iff running
- # a debug build of Python
- cmd.debug = sys.executable.endswith("_d.exe")
cmd.build_lib = self.tmp_dir
cmd.build_temp = self.tmp_dir
@@ -305,9 +301,6 @@ class BuildExtTestCase(TempdirManager,
cmd.ensure_finalized()
self.assertEqual(len(cmd.get_outputs()), 1)
- if os.name == "nt":
- cmd.debug = sys.executable.endswith("_d.exe")
-
cmd.build_lib = os.path.join(self.tmp_dir, 'build')
cmd.build_temp = os.path.join(self.tmp_dir, 'tempt')