diff -rupN --no-dereference sip-4.19.24/configure.py sip-4.19.24-new/configure.py
--- sip-4.19.24/configure.py 2020-08-13 13:25:37.000000000 +0200
+++ sip-4.19.24-new/configure.py 2020-08-18 14:11:32.257534244 +0200
@@ -275,8 +275,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,
@@ -364,6 +364,9 @@ def create_makefiles(macros):
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):
@@ -378,6 +381,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")
@@ -406,9 +410,9 @@ def create_makefiles(macros):
if gen_installs:
# There will only be one element.
- files, path = gen_installs[0]
+ file, path = gen_installs[0]
pro.write("\n")
- pro.write("sip_h.files = %s\n" % " ".join(files))
+ pro.write("sip_h.files = %s\n" % files)
pro.write("sip_h.path = %s\n" % quote(path))
pro.write("INSTALLS += sip_h\n")
@@ -432,7 +436,7 @@ def create_makefiles(macros):
# The implied 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))
@@ -446,7 +450,7 @@ def create_makefiles(macros):
all_installs.extend(module_installs)
if not opts.no_module:
- if sys.platform == 'win32':
+ if 'win' in build_platform:
mod = 'sip.lib' if opts.static else 'sip.pyd'
else:
mod = 'libsip.a' if opts.static else 'sip.so'
@@ -456,6 +460,7 @@ def create_makefiles(macros):
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")
@@ -489,7 +494,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%s' % (sys.version_info.major, sys.version_info.minor, sysconfig.get_config_var('ABIFLAGS') or "")
+ link_lib = "-L" + cfg.py_lib_dir + " -l" + py_lib
pro.write("""
win32 {
@@ -513,7 +519,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" % sip_module_dest_dir)