aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Dunn <robin@alldunn.com>2013-07-08 10:14:31 -0700
committerRobin Dunn <robin@alldunn.com>2013-07-20 16:05:52 -0700
commit262e1cc90af9174d7099826068707d97209fe6e7 (patch)
tree805f31ffa96ca260c03118791538d9e1d4559d93
parentf9e4f1b8054687dc4e16ed576dd1a10c62907994 (diff)
Allow either a _d or a non _d library for debug builds.
This allows a debug PySide to be built with a non-debug Python.
-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)