summaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-09-23 17:37:54 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-09-23 17:37:54 -0500
commit3dbad9809f463539c8f191fa529e31c283f40909 (patch)
tree5112f62f19400e9a77a8f91c48c7110555f8df97 /configure.py
parent9dfbb777e9e52a55cf237e4d87050903aa024dbb (diff)
downloadpytde-3dbad9809f463539c8f191fa529e31c283f40909.tar.gz
pytde-3dbad9809f463539c8f191fa529e31c283f40909.zip
Add ability to set libpython library
This relates to Bug 1995
Diffstat (limited to 'configure.py')
-rw-r--r--configure.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/configure.py b/configure.py
index c11e626..4af4e9b 100644
--- a/configure.py
+++ b/configure.py
@@ -231,6 +231,7 @@ def usage(rcode = 2):
print " -h displays this help message"
print " -c concatenates each module's C/C++ source files [default]"
print " -d dir where the PyKDE modules will be installed [default %s]" % opt_pytdemoddir
+ print " -e lib explicitly specify the python library"
print " -g always release the GIL (SIP v3.x behaviour)"
print " -i no concatenation of each module's C/C++ source files"
print " -j # splits the concatenated C++ source files into # pieces [default 1]"
@@ -557,7 +558,7 @@ def set_sip_flags():
kde_sip_flags.append(sipconfig.version_to_sip_tag(kde_version, kdetags, "KDE"))
-def generate_code(mname, imports=None, extra_cflags=None, extra_cxxflags=None, extra_define=None, extra_include_dir=None, extra_lflags=None, extra_lib_dir=None, extra_lib=None, opengl=0, sip_flags=None):
+def generate_code(mname, imports=None, extra_cflags=None, extra_cxxflags=None, extra_define=None, extra_include_dir=None, extra_lflags=None, extra_lib_dir=None, extra_lib=None, extra_libs=None, opengl=0, sip_flags=None):
"""Generate the code for a module.
mname is the name of the module.
@@ -766,6 +767,9 @@ def generate_code(mname, imports=None, extra_cflags=None, extra_cxxflags=None, e
makefile.extra_cflags.append ("-fno-rtti")
makefile.extra_cxxflags.append ("-fno-rtti")
+ if extra_libs:
+ makefile.extra_libs.extend(extra_libs)
+
if sipcfg.sip_version < 0x040000 and imports:
# Inter-module links.
for im in imports:
@@ -819,7 +823,7 @@ def main(argv):
argv is the list of command line arguments.
"""
try:
- optlist, args = getopt.getopt(argv[1:], "hcd:gij:k:L:l:n:o:ruv:wz:")
+ optlist, args = getopt.getopt(argv[1:], "hcd:e:gij:k:L:l:n:o:ruv:wz:")
except getopt.GetoptError:
usage()
@@ -830,6 +834,7 @@ def main(argv):
global opt_tdebasedir, opt_kdelibdir, opt_kdeincdir, opt_libdir
global pytde_modules, opt_dep_warnings, opt_dist_name
global pytde_imports, kde_includes
+ global opt_libpython
# Look for '-z' first and process that switch
# (command line switches override file switches)
@@ -846,6 +851,9 @@ def main(argv):
if opt == "-h":
usage(0)
+ elif opt == "-e":
+ opt_libpython = arg
+
# turns on concatentation (on by default, here for consistency)
elif opt == "-c":
opt_concat = 1
@@ -923,7 +931,10 @@ def main(argv):
set_sip_flags()
for module in pytde_modules [opt_startmod:opt_endmod]:
- generate_code (module, pytde_imports [module], extra_lib = module)
+ extra_libs = []
+ if opt_libpython:
+ extra_libs.append(opt_libpython)
+ generate_code (module, pytde_imports [module], extra_lib = module, extra_libs = extra_libs)
# Create the additional Makefiles.
create_makefiles()