aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 5023c7d4a..964f8c98d 100644
--- a/setup.py
+++ b/setup.py
@@ -377,9 +377,17 @@ class pyside_build(_build):
if sys.version_info[0] > 2:
lib_suff = getattr(sys, 'abiflags', None)
else: # Python 2
- lib_suff = dbgPostfix
+ lib_suff = ''
lib_exts.append('.so.1')
lib_exts.append('.a') # static library as last gasp
+
+ if sys.version_info[0] == 2 and dbgPostfix:
+ # For Python2 add a duplicate set of extensions combined with
+ # the dbgPostfix, so we test for both the debug version of
+ # the lib and the normal one. This allows a debug PySide to
+ # be built with a non-debug Python.
+ lib_exts = [dbgPostfix + e for e in lib_exts] + lib_exts
+
libs_tried = []
for lib_ext in lib_exts:
lib_name = "libpython%s%s%s" % (py_version, lib_suff, lib_ext)