|
|
|
@ -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()
|
|
|
|
|