aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 03e8d7800..d78197440 100644
--- a/setup.py
+++ b/setup.py
@@ -402,6 +402,9 @@ Use --list-versions option to get list of available versions""" % OPTION_VERSION
sys.exit(1)
__version__ = OPTION_VERSION
+def is_debug_python():
+ return getattr(sys, "gettotalrefcount", None) is not None
+
# Return a prefix suitable for the _install/_build directory
def prefix():
virtualEnvName = os.environ.get('VIRTUAL_ENV', None)
@@ -409,6 +412,8 @@ def prefix():
name += str(sys.version_info[0])
if OPTION_DEBUG:
name += 'd'
+ if is_debug_python():
+ name += 'p'
return name
# Initialize, pull and checkout submodules