diff -rupN sip-4.19.12/configure.py sip-4.19.12-new/configure.py
--- sip-4.19.12/configure.py 2018-07-05 11:55:19.000000000 +0200
+++ sip-4.19.12-new/configure.py 2018-07-29 22:19:03.828858076 +0200
@@ -271,8 +271,8 @@ def create_config(module, template, macr
"sip_inc_dir": sip_inc_dir,
"sip_root_dir": sip_root_dir,
"sip_module_dir": sip_module_dir,
- "default_bin_dir": plat_bin_dir,
- "default_mod_dir": plat_py_site_dir,
+ "default_bin_dir": sip_bin_dir,
+ "default_mod_dir": sip_module_dir,
"default_sip_dir": sip_sip_dir,
"py_version": py_version,
"py_inc_dir": plat_py_inc_dir,
@@ -322,19 +322,20 @@ def create_makefiles(macros):
distinfo_dir = os.path.join(cfg.sip_root_dir,
'%s-%s.dist-info' % (sip_module_name.replace('.', '_'),
sip_version_str))
- run_mk_distinfo = '%s %s "$(DESTDIR)" %s installed.txt' % (sys.executable,
- mk_distinfo, distinfo_dir)
if opts.use_qmake:
sipconfig.inform("Creating top level .pro file...")
+ run_mk_distinfo = '%s %s "$(INSTALL_ROOT)" %s installed.txt' % (sys.executable,
+ mk_distinfo, distinfo_dir)
+
pro = open("sip.pro", "w")
pro.write("TEMPLATE = subdirs\n")
pro.write("SUBDIRS = %s\n" % " ".join(subdirs))
if installs:
- files, path = installs
+ files, path = installs[0]
pro.write("\n")
pro.write("build_system.files = %s\n" % " ".join(files))
pro.write("build_system.path = %s\n" % quote(path))
@@ -350,6 +351,9 @@ def create_makefiles(macros):
else:
sipconfig.inform("Creating top level Makefile...")
+ run_mk_distinfo = '%s %s "$(DESTDIR)" %s installed.txt' % (sys.executable,
+ mk_distinfo, distinfo_dir)
+
# Note that mk_distinfo.py won't exist if we are building from the
# repository.
if opts.distinfo and os.path.isfile(mk_distinfo):
@@ -364,6 +368,7 @@ def create_makefiles(macros):
if opts.use_qmake:
sipconfig.inform("Creating sip code generator .pro file...")
+ os.makedirs("sipgen")
pro = open(os.path.join("sipgen", "sipgen.pro"), "w")
pro.write("TEMPLATE = app\n")
@@ -409,7 +414,7 @@ def create_makefiles(macros):
# The code generator installs.
if not opts.no_tools:
sip_dir, sip_exe = os.path.split(cfg.sip_bin)
- if sys.platform == 'win32':
+ if 'win' in build_platform:
sip_exe += '.exe'
all_installs.append((sip_exe, sip_dir))
@@ -427,12 +432,13 @@ def create_makefiles(macros):
all_installs.extend(module_installs)
if not opts.no_module:
- mod_ext = '.pyd' if sys.platform == 'win32' else '.so'
+ mod_ext = '.pyd' if 'win' in build_platform else '.so'
all_installs.append(('sip' + mod_ext, cfg.sip_module_dir))
if opts.use_qmake:
sipconfig.inform("Creating sip module .pro file...")
+ os.makedirs("siplib")
pro = open(os.path.join("siplib", "siplib.pro"), "w")
pro.write("TEMPLATE = lib\n")
@@ -458,7 +464,8 @@ def create_makefiles(macros):
if not opts.static:
# These only need to be correct for Windows.
debug_suffix = "_d" if opts.debug else ""
- link_lib_dir = quote("-L" + cfg.py_lib_dir)
+ py_lib = 'python%d.%d' % (sys.version_info.major, sys.version_info.minor)
+ link_lib = "-L" + cfg.py_lib_dir + " -l" + py_lib
pro.write("""
win32 {
@@ -482,7 +489,7 @@ QMAKE_POST_LINK = $(COPY_FILE) $$PY_MODU
target.CONFIG = no_check_exist
target.files = $$PY_MODULE
-""" % (debug_suffix, link_lib_dir))
+""" % (debug_suffix, link_lib))
pro.write("\n")
pro.write("target.path = %s\n" % cfg.sip_module_dir)