diff -rupN --no-dereference sip-4.19.21/configure.py sip-4.19.21-new/configure.py --- sip-4.19.21/configure.py 2020-01-29 16:48:31.000000000 +0100 +++ sip-4.19.21-new/configure.py 2020-01-31 23:01:15.588562356 +0100 @@ -274,8 +274,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, @@ -362,6 +362,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): @@ -376,6 +379,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") @@ -404,9 +408,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") @@ -430,7 +434,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)) @@ -444,7 +448,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' @@ -454,6 +458,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") @@ -483,7 +488,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 { @@ -507,7 +513,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)