|
|
429a963 |
diff -rupN --no-dereference sip-4.19.21/configure.py sip-4.19.21-new/configure.py
|
|
|
429a963 |
--- sip-4.19.21/configure.py 2020-01-29 16:48:31.000000000 +0100
|
|
|
429a963 |
+++ sip-4.19.21-new/configure.py 2020-01-31 23:01:15.588562356 +0100
|
|
|
37d1e8d |
@@ -274,8 +274,8 @@ def create_config(module, template, macr
|
|
|
40c0f8a |
"sip_inc_dir": sip_inc_dir,
|
|
|
245d04b |
"sip_root_dir": sip_root_dir,
|
|
|
245d04b |
"sip_module_dir": sip_module_dir,
|
|
|
40c0f8a |
- "default_bin_dir": plat_bin_dir,
|
|
|
40c0f8a |
- "default_mod_dir": plat_py_site_dir,
|
|
|
40c0f8a |
+ "default_bin_dir": sip_bin_dir,
|
|
|
40c0f8a |
+ "default_mod_dir": sip_module_dir,
|
|
|
40c0f8a |
"default_sip_dir": sip_sip_dir,
|
|
|
40c0f8a |
"py_version": py_version,
|
|
|
40c0f8a |
"py_inc_dir": plat_py_inc_dir,
|
|
|
37d1e8d |
@@ -362,6 +362,9 @@ def create_makefiles(macros):
|
|
|
245d04b |
|
|
|
245d04b |
sipconfig.inform("Creating top level Makefile...")
|
|
|
245d04b |
|
|
|
245d04b |
+ run_mk_distinfo = '%s %s "$(DESTDIR)" %s installed.txt' % (sys.executable,
|
|
|
245d04b |
+ mk_distinfo, distinfo_dir)
|
|
|
245d04b |
+
|
|
|
245d04b |
# Note that mk_distinfo.py won't exist if we are building from the
|
|
|
245d04b |
# repository.
|
|
|
245d04b |
if opts.distinfo and os.path.isfile(mk_distinfo):
|
|
|
37d1e8d |
@@ -376,6 +379,7 @@ def create_makefiles(macros):
|
|
|
d2618ba |
if opts.use_qmake:
|
|
|
d2618ba |
sipconfig.inform("Creating sip code generator .pro file...")
|
|
|
d2618ba |
|
|
|
d2618ba |
+ os.makedirs("sipgen")
|
|
|
d2618ba |
pro = open(os.path.join("sipgen", "sipgen.pro"), "w")
|
|
|
d2618ba |
|
|
|
d2618ba |
pro.write("TEMPLATE = app\n")
|
|
|
37d1e8d |
@@ -404,9 +408,9 @@ def create_makefiles(macros):
|
|
|
74413ee |
|
|
|
74413ee |
if gen_installs:
|
|
|
74413ee |
# There will only be one element.
|
|
|
74413ee |
- files, path = gen_installs[0]
|
|
|
74413ee |
+ file, path = gen_installs[0]
|
|
|
74413ee |
pro.write("\n")
|
|
|
74413ee |
- pro.write("sip_h.files = %s\n" % " ".join(files))
|
|
|
74413ee |
+ pro.write("sip_h.files = %s\n" % files)
|
|
|
74413ee |
pro.write("sip_h.path = %s\n" % quote(path))
|
|
|
74413ee |
pro.write("INSTALLS += sip_h\n")
|
|
|
74413ee |
|
|
|
37d1e8d |
@@ -430,7 +434,7 @@ def create_makefiles(macros):
|
|
|
74413ee |
# The implied code generator installs.
|
|
|
245d04b |
if not opts.no_tools:
|
|
|
245d04b |
sip_dir, sip_exe = os.path.split(cfg.sip_bin)
|
|
|
245d04b |
- if sys.platform == 'win32':
|
|
|
245d04b |
+ if 'win' in build_platform:
|
|
|
245d04b |
sip_exe += '.exe'
|
|
|
245d04b |
|
|
|
245d04b |
all_installs.append((sip_exe, sip_dir))
|
|
|
37d1e8d |
@@ -444,7 +448,7 @@ def create_makefiles(macros):
|
|
|
245d04b |
all_installs.extend(module_installs)
|
|
|
245d04b |
|
|
|
245d04b |
if not opts.no_module:
|
|
|
74413ee |
- if sys.platform == 'win32':
|
|
|
74413ee |
+ if 'win' in build_platform:
|
|
|
74413ee |
mod = 'sip.lib' if opts.static else 'sip.pyd'
|
|
|
74413ee |
else:
|
|
|
74413ee |
mod = 'libsip.a' if opts.static else 'sip.so'
|
|
|
37d1e8d |
@@ -454,6 +458,7 @@ def create_makefiles(macros):
|
|
|
245d04b |
if opts.use_qmake:
|
|
|
d2618ba |
sipconfig.inform("Creating sip module .pro file...")
|
|
|
d2618ba |
|
|
|
d2618ba |
+ os.makedirs("siplib")
|
|
|
d2618ba |
pro = open(os.path.join("siplib", "siplib.pro"), "w")
|
|
|
d2618ba |
|
|
|
d2618ba |
pro.write("TEMPLATE = lib\n")
|
|
|
37d1e8d |
@@ -483,7 +488,8 @@ def create_makefiles(macros):
|
|
|
fee5098 |
if not opts.static:
|
|
|
fee5098 |
# These only need to be correct for Windows.
|
|
|
fee5098 |
debug_suffix = "_d" if opts.debug else ""
|
|
|
fee5098 |
- link_lib_dir = quote("-L" + cfg.py_lib_dir)
|
|
|
99455f7 |
+ py_lib = 'python%d.%d%s' % (sys.version_info.major, sys.version_info.minor, sysconfig.get_config_var('ABIFLAGS') or "")
|
|
|
fee5098 |
+ link_lib = "-L" + cfg.py_lib_dir + " -l" + py_lib
|
|
|
fee5098 |
|
|
|
fee5098 |
pro.write("""
|
|
|
fee5098 |
win32 {
|
|
|
37d1e8d |
@@ -507,7 +513,7 @@ QMAKE_POST_LINK = $(COPY_FILE) $$PY_MODU
|
|
|
245d04b |
|
|
|
fee5098 |
target.CONFIG = no_check_exist
|
|
|
fee5098 |
target.files = $$PY_MODULE
|
|
|
245d04b |
-""" % (debug_suffix, link_lib_dir))
|
|
|
245d04b |
+""" % (debug_suffix, link_lib))
|
|
|
fee5098 |
|
|
|
fee5098 |
pro.write("\n")
|
|
|
74413ee |
pro.write("target.path = %s\n" % sip_module_dest_dir)
|