summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/build.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-01-21 17:42:40 (GMT)
committerGeorg Brandl <georg@python.org>2008-01-21 17:42:40 (GMT)
commit501601591be66d7e3d9789e2465d466df1e05c50 (patch)
treecd03b1b502cade7c5688afe8dec587ef3d0273aa /Lib/distutils/command/build.py
parent733024a7528cb67ad0a8df52a122d757df2ef2d7 (diff)
downloadcpython-501601591be66d7e3d9789e2465d466df1e05c50.zip
cpython-501601591be66d7e3d9789e2465d466df1e05c50.tar.gz
cpython-501601591be66d7e3d9789e2465d466df1e05c50.tar.bz2
#1530959: change distutils build dir for --with-pydebug python builds.
Diffstat (limited to 'Lib/distutils/command/build.py')
-rw-r--r--Lib/distutils/command/build.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/distutils/command/build.py b/Lib/distutils/command/build.py
index 9ae0a29..bca031f 100644
--- a/Lib/distutils/command/build.py
+++ b/Lib/distutils/command/build.py
@@ -69,6 +69,12 @@ class build (Command):
plat_specifier = ".%s-%s" % (get_platform(), sys.version[0:3])
+ # Make it so Python 2.x and Python 2.x with --with-pydebug don't
+ # share the same build directories. Doing so confuses the build
+ # process for C modules
+ if hasattr(sys, 'gettotalrefcount'):
+ plat_specifier += '-pydebug'
+
# 'build_purelib' and 'build_platlib' just default to 'lib' and
# 'lib.<plat>' under the base build directory. We only use one of
# them for a given distribution, though --