summaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2023-01-03 00:52:18 +0100
committerSlávek Banko <slavek.banko@axis.cz>2023-01-20 02:10:39 +0100
commit16434e5519f6224e231bc5f7202f0e495eda7bb7 (patch)
treed0a3bc5f18eb65f89c1e6238dcf579e6c9cb80ad /configure.py
parent1c362264d328c8886d33061ab992750741f7933a (diff)
downloadpytqt-16434e5519f6224e231bc5f7202f0e495eda7bb7.tar.gz
pytqt-16434e5519f6224e231bc5f7202f0e495eda7bb7.zip
Do rename qt=>tqt on source files, directories and libraries.
Rename pyuic=>pytquic, pylupdate=>pytqlupdate. Do rename qt=>tqt on constants and variables. Do rename QT=>TQT on constants. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'configure.py')
-rw-r--r--configure.py652
1 files changed, 326 insertions, 326 deletions
diff --git a/configure.py b/configure.py
index 56c3537..30b117a 100644
--- a/configure.py
+++ b/configure.py
@@ -33,51 +33,51 @@ import sip_tqt_config
src_dir = os.path.dirname(os.path.abspath(__file__))
# Initialise the globals.
-pyqt_version = 0x031201
-pyqt_version_str = "3.18.1"
+pytqt_version = 0x031201
+pytqt_version_str = "3.18.1"
sip_min_version = 0x040800
# Try and find a TQt installation to use as the default.
try:
- qt_dir = os.environ["TQTDIR"]
+ tqt_dir = os.environ["TQTDIR"]
except KeyError:
- qt_dir = ""
-
-
-qt_version = 0
-qt_edition = ""
-qt_incdir = None
-qt_libdir = None
-qt_threaded = 0
-qt_winconfig = ""
-
-pyqt = None
-pyqt_modules = []
-qt_sip_flags = []
-qtext_sip_flags = []
-qtpe_sip_flags = []
-qsci_version = 0
+ tqt_dir = ""
+
+
+tqt_version = 0
+tqt_edition = ""
+tqt_incdir = None
+tqt_libdir = None
+tqt_threaded = 0
+tqt_winconfig = ""
+
+pytqt = None
+pytqt_modules = []
+tqt_sip_flags = []
+tqtext_sip_flags = []
+tqtpe_sip_flags = []
+tqsci_version = 0
disabled_classes = []
if sys.platform == "win32":
- qsci_define = "TQEXTSCINTILLA_DLL"
+ tqsci_define = "TQEXTSCINTILLA_DLL"
else:
- qsci_define = ""
+ tqsci_define = ""
# Get the SIP-TQt configuration.
sipcfg = sip_tqt_config.Configuration()
# Command line options.
opt_tqtlib = None
-opt_qconfigdir = None
-opt_pyqtbindir = sipcfg.default_bin_dir
-opt_pyqtmoddir = os.path.join(sipcfg.default_mod_dir, "PyTQt")
-opt_pyqtsipdir = sipcfg.default_sip_dir
-opt_qtpetag = None
-opt_qsciincdir = None
-opt_qscilibdir = None
+opt_tqconfigdir = None
+opt_pytqtbindir = sipcfg.default_bin_dir
+opt_pytqtmoddir = os.path.join(sipcfg.default_mod_dir, "PyTQt")
+opt_pytqtsipdir = sipcfg.default_sip_dir
+opt_tqtpetag = None
+opt_tqsciincdir = None
+opt_tqscilibdir = None
opt_static = 0
opt_debug = 0
opt_concat = 0
@@ -97,22 +97,22 @@ def usage(rcode = 2):
rcode is the return code passed back to the calling process.
"""
- if qt_dir:
- def_qt_dir = qt_dir
+ if tqt_dir:
+ def_tqt_dir = tqt_dir
else:
- def_qt_dir = "none"
+ def_tqt_dir = "none"
sys.stdout.write("Usage:\n")
sys.stdout.write(" python configure.py [-h] [-a tag] [-b dir] [-c] [-d dir] [-e lib] [-f] [-g dir] [-i] [-j #] [-k] [-l dir] [-m dir] [-n dir] [-o dir] [-q dir] [-r] [-s] [-u] [-v dir] [-w] [-y lib] option=value option+=value ...\n")
sys.stdout.write("where:\n")
sys.stdout.write(" -h display this help message\n")
- sys.stdout.write(" -a tag explicitly enable the qtpe module\n")
- sys.stdout.write(" -b dir where pyuic and pylupdate will be installed [default %s]\n" % opt_pyqtbindir)
+ sys.stdout.write(" -a tag explicitly enable the tqtpe module\n")
+ sys.stdout.write(" -b dir where pytquic and pytqlupdate will be installed [default %s]\n" % opt_pytqtbindir)
sys.stdout.write(" -c concatenate each module's C/C++ source files\n")
- sys.stdout.write(" -d dir where the PyTQt modules will be installed [default %s]\n" % opt_pyqtmoddir)
+ sys.stdout.write(" -d dir where the PyTQt modules will be installed [default %s]\n" % opt_pytqtmoddir)
sys.stdout.write(" -e lib explicitly specify the python library\n")
sys.stdout.write(" -f keep any existing features file (when cross-compiling) [default remove]\n")
- sys.stdout.write(" -g dir where the TQt qconfig.h file can be found [default TQt include directory]\n")
+ sys.stdout.write(" -g dir where the TQt tqconfig.h file can be found [default TQt include directory]\n")
sys.stdout.write(" -i enable checking of signed interpreters using the VendorID package [default disabled]\n")
sys.stdout.write(" -j # split the concatenated C++ source files into # pieces [default 1]\n")
sys.stdout.write(" -k build the PyTQt modules as static libraries\n")
@@ -120,13 +120,13 @@ def usage(rcode = 2):
sys.stdout.write(" -m dir the directory containing the VendorID library [default %s]\n" % opt_vendlibdir)
sys.stdout.write(" -n dir the directory containing the TQScintilla header files [default TQt include directory]\n")
sys.stdout.write(" -o dir the directory containing the TQScintilla library [default TQt lib directory]\n")
- sys.stdout.write(" -q dir the root directory of the TQt installation [default %s]\n" % def_qt_dir)
+ sys.stdout.write(" -q dir the root directory of the TQt installation [default %s]\n" % def_tqt_dir)
sys.stdout.write(" -r generate code with tracing enabled [default disabled]\n")
sys.stdout.write(" -s TQScintilla is a static library and not a DLL (Windows only)\n")
sys.stdout.write(" -u build with debugging symbols (requires a debug build of Python on Windows\n")
- sys.stdout.write(" -v dir where the PyTQt .sip files will be installed [default %s]\n" % opt_pyqtsipdir)
+ sys.stdout.write(" -v dir where the PyTQt .sip files will be installed [default %s]\n" % opt_pytqtsipdir)
sys.stdout.write(" -w don't suppress compiler output during configuration\n")
- sys.stdout.write(" -y lib explicitly specify the type of TQt library, either qt, qt-mt, qte, qte-mt, qtmt, tqt, tqt-mt, tqte, tqte-mt or tqtmt\n")
+ sys.stdout.write(" -y lib explicitly specify the type of TQt library, either tqt, tqt-mt, tqte, tqte-mt or tqtmt\n")
sys.stdout.write(" -z accept the license terms without prompting\n")
sys.exit(rcode)
@@ -151,7 +151,7 @@ class ConfigureBase:
"""
return []
- def qt_version_tags(self):
+ def tqt_version_tags(self):
"""Get the versions tags for the configuration.
Returns a dictionary of versions and corresponding tags.
@@ -181,66 +181,66 @@ class ConfigureBase:
def module_dir(self):
"""Return the configuration's module directory.
"""
- return opt_pyqtmoddir
+ return opt_pytqtmoddir
def module_installs(self):
"""Return a list of files to install in the module directory other than
the modules themselves.
"""
- return ["__init__.py", "pyqtconfig.py"]
+ return ["__init__.py", "pytqtconfig.py"]
def sip_dir(self):
"""Return the configuration's .sip files directory.
"""
- return opt_pyqtsipdir
+ return opt_pytqtsipdir
class ConfigurePyTQt3(ConfigureBase):
"""This class defines the methods to configure PyTQt v3.
"""
def check_modules(self):
- pyqt_modules.append("qt")
+ pytqt_modules.append("tqt")
- check_module("qtcanvas", "qcanvas.h", "TQCanvas()")
- check_module("qtnetwork", "qsocket.h", "TQSocket()")
- check_module("qttable", "qtable.h", "TQTable()")
- check_module("qtxml", "qdom.h", "TQDomImplementation()")
- check_module("qtgl", "qgl.h", "TQGLWidget()", opengl=1)
+ check_module("tqtcanvas", "tqcanvas.h", "TQCanvas()")
+ check_module("tqtnetwork", "tqsocket.h", "TQSocket()")
+ check_module("tqttable", "tqtable.h", "TQTable()")
+ check_module("tqtxml", "tqdom.h", "TQDomImplementation()")
+ check_module("tqtgl", "tqgl.h", "TQGLWidget()", opengl=1)
- if qt_version >= 0x030000:
- check_module("qtui", "qwidgetfactory.h", "TQWidgetFactory()", lib="tqui")
+ if tqt_version >= 0x030000:
+ check_module("tqtui", "tqwidgetfactory.h", "TQWidgetFactory()", lib="tqui")
- if qt_edition in ("enterprise", "free"):
- check_module("qtsql", "qsql.h", "TQSql()")
+ if tqt_edition in ("enterprise", "free"):
+ check_module("tqtsql", "tqsql.h", "TQSql()")
if sys.platform == "win32" and sipcfg.sip_version >= 0x040200:
- check_module("qtaxcontainer", "qaxobject.h", "TQAxObject()", lib="qaxcontainer")
+ check_module("tqtaxcontainer", "tqaxobject.h", "TQAxObject()", lib="tqaxcontainer")
- if qsci_version:
- check_module("qtext", "tqextscintillabase.h", "TQextScintillaBase()", define=qsci_define, include_dir=opt_qsciincdir, lib_dir=opt_qscilibdir, lib="tqscintilla")
+ if tqsci_version:
+ check_module("tqtext", "tqextscintillabase.h", "TQextScintillaBase()", define=tqsci_define, include_dir=opt_tqsciincdir, lib_dir=opt_tqscilibdir, lib="tqscintilla")
- if opt_qtpetag:
- pyqt_modules.append("qtpe")
+ if opt_tqtpetag:
+ pytqt_modules.append("tqtpe")
- qtmod_lib = None
+ tqtmod_lib = None
- if qt_version >= 0x030100:
+ if tqt_version >= 0x030100:
sip_tqt_config.inform("Checking to see if the TQAssistantClient class is available...")
- if check_class("qassistantclient.h", "TQAssistantClient(\"foo\")", lib="qassistantclient"):
- qtmod_lib = "qassistantclient"
+ if check_class("tqassistantclient.h", "TQAssistantClient(\"foo\")", lib="tqassistantclient"):
+ tqtmod_lib = "tqassistantclient"
else:
- if check_class("ntqassistantclient.h", "TQAssistantClient(\"foo\")", lib="qassistantclient"):
- qtmod_lib = "qassistantclient"
+ if check_class("ntqassistantclient.h", "TQAssistantClient(\"foo\")", lib="tqassistantclient"):
+ tqtmod_lib = "tqassistantclient"
else:
disabled_classes.append("TQAssistantClient")
- return qtmod_lib
+ return tqtmod_lib
def sip_flags(self):
return get_feature_flags()
- def qt_version_tags(self):
+ def tqt_version_tags(self):
return {
0x010403: None,
0x020000: "TQt_1_43",
@@ -265,102 +265,102 @@ class ConfigurePyTQt3(ConfigureBase):
}
def code(self, extra_include_dirs, extra_lib_dir, extra_libs):
- generate_code("qt", extra_include_dirs=extra_include_dirs, extra_lib_dir=extra_lib_dir, extra_libs=extra_libs)
+ generate_code("tqt", extra_include_dirs=extra_include_dirs, extra_lib_dir=extra_lib_dir, extra_libs=extra_libs)
- if "qtext" in pyqt_modules:
- generate_code("qtext", extra_define=qsci_define, extra_include_dirs=[opt_qsciincdir], extra_lib_dir=opt_qscilibdir, extra_libs=["tqscintilla"]+extra_libs, sip_flags=qtext_sip_flags)
+ if "tqtext" in pytqt_modules:
+ generate_code("tqtext", extra_define=tqsci_define, extra_include_dirs=[opt_tqsciincdir], extra_lib_dir=opt_tqscilibdir, extra_libs=["tqscintilla"]+extra_libs, sip_flags=tqtext_sip_flags)
- if "qtgl" in pyqt_modules:
- generate_code("qtgl", opengl=1, extra_include_dirs=extra_include_dirs, extra_lib_dir=extra_lib_dir, extra_libs=extra_libs)
+ if "tqtgl" in pytqt_modules:
+ generate_code("tqtgl", opengl=1, extra_include_dirs=extra_include_dirs, extra_lib_dir=extra_lib_dir, extra_libs=extra_libs)
- if "qtpe" in pyqt_modules:
- generate_code("qtpe", extra_include_dirs=extra_include_dirs, extra_lib_dir=extra_lib_dir, extra_libs=["qpe"]+extra_libs, sip_flags=qtpe_sip_flags)
+ if "tqtpe" in pytqt_modules:
+ generate_code("tqtpe", extra_include_dirs=extra_include_dirs, extra_lib_dir=extra_lib_dir, extra_libs=["tqpe"]+extra_libs, sip_flags=tqtpe_sip_flags)
- if "qtui" in pyqt_modules:
- generate_code("qtui", extra_include_dirs=extra_include_dirs, extra_lib_dir=extra_lib_dir, extra_libs=["tqui"]+extra_libs)
+ if "tqtui" in pytqt_modules:
+ generate_code("tqtui", extra_include_dirs=extra_include_dirs, extra_lib_dir=extra_lib_dir, extra_libs=["tqui"]+extra_libs)
- if "qtaxcontainer" in pyqt_modules:
- generate_code("qtaxcontainer", extra_include_dirs=extra_include_dirs, extra_lib_dir=extra_lib_dir, extra_libs=["qaxcontainer"]+extra_libs)
+ if "tqtaxcontainer" in pytqt_modules:
+ generate_code("tqtaxcontainer", extra_include_dirs=extra_include_dirs, extra_lib_dir=extra_lib_dir, extra_libs=["tqaxcontainer"]+extra_libs)
# The rest don't need special handling.
- for m in ("qtcanvas", "qtnetwork", "qtsql", "qttable", "qtxml"):
- if m in pyqt_modules:
+ for m in ("tqtcanvas", "tqtnetwork", "tqtsql", "tqttable", "tqtxml"):
+ if m in pytqt_modules:
generate_code(m, extra_include_dirs=extra_include_dirs, extra_lib_dir=extra_lib_dir, extra_libs=extra_libs)
def tools(self):
tool_dirs = []
- if qt_version >= 0x030000:
+ if tqt_version >= 0x030000:
# The Professional Edition needs special handling.
- prof = (qt_edition == "professional")
+ prof = (tqt_edition == "professional")
- sip_tqt_config.inform("Creating pyuic Makefile...")
+ sip_tqt_config.inform("Creating pytquic Makefile...")
- if prof or "qtxml" not in pyqt_modules:
- buildfile= "pyuic-prof.sbf"
+ if prof or "tqtxml" not in pytqt_modules:
+ buildfile= "pytquic-prof.sbf"
- for xml in ("qdom.cpp", "qxml.cpp"):
- shutil.copyfile(qt_dir + "/src/xml/" + xml, "pyuic3/" + xml)
+ for xml in ("tqdom.cpp", "tqxml.cpp"):
+ shutil.copyfile(tqt_dir + "/src/xml/" + xml, "pytquic3/" + xml)
else:
- buildfile= "pyuic.sbf"
+ buildfile= "pytquic.sbf"
makefile = sip_tqt_config.ProgramMakefile(
configuration=sipcfg,
- build_file=os.path.join(src_dir, "pyuic3", buildfile),
- dir="pyuic3",
- install_dir=opt_pyqtbindir,
+ build_file=os.path.join(src_dir, "pytquic3", buildfile),
+ dir="pytquic3",
+ install_dir=opt_pytqtbindir,
console=1,
- qt=1,
+ tqt=1,
warnings=1
)
makefile.extra_defines.append("UIC")
- makefile.extra_defines.append("QT_INTERNAL_XML")
+ makefile.extra_defines.append("TQT_INTERNAL_XML")
- if prof or "qtxml" not in pyqt_modules:
+ if prof or "tqtxml" not in pytqt_modules:
makefile.extra_defines.append("TQT_MODULE_XML")
- if qt_version < 0x030100:
- makefile.extra_include_dirs.append(qt_dir + "/src/3rdparty/zlib")
- makefile.extra_include_dirs.append(os.path.join(src_dir, "pyuic3"))
+ if tqt_version < 0x030100:
+ makefile.extra_include_dirs.append(tqt_dir + "/src/3rdparty/zlib")
+ makefile.extra_include_dirs.append(os.path.join(src_dir, "pytquic3"))
- if not os.access("pyuic3", os.F_OK):
- os.mkdir("pyuic3")
+ if not os.access("pytquic3", os.F_OK):
+ os.mkdir("pytquic3")
makefile.generate()
- tool_dirs.append("pyuic3")
+ tool_dirs.append("pytquic3")
- sip_tqt_config.inform("Creating pylupdate Makefile...")
+ sip_tqt_config.inform("Creating pytqlupdate Makefile...")
- if prof or "qtxml" not in pyqt_modules:
- buildfile= "pylupdate-prof.sbf"
+ if prof or "tqtxml" not in pytqt_modules:
+ buildfile= "pytqlupdate-prof.sbf"
- shutil.copyfile(qt_dir + "/src/xml/qxml.cpp", "pylupdate3/qxml.cpp")
+ shutil.copyfile(tqt_dir + "/src/xml/tqxml.cpp", "pytqlupdate3/tqxml.cpp")
else:
- buildfile= "pylupdate.sbf"
+ buildfile= "pytqlupdate.sbf"
makefile = sip_tqt_config.ProgramMakefile(
configuration=sipcfg,
- build_file=os.path.join(src_dir, "pylupdate3", buildfile),
- dir="pylupdate3",
- install_dir=opt_pyqtbindir,
+ build_file=os.path.join(src_dir, "pytqlupdate3", buildfile),
+ dir="pytqlupdate3",
+ install_dir=opt_pytqtbindir,
console=1,
- qt=1,
+ tqt=1,
warnings=1
)
- makefile.extra_defines.append("QT_INTERNAL_XML")
+ makefile.extra_defines.append("TQT_INTERNAL_XML")
- if prof or "qtxml" not in pyqt_modules:
+ if prof or "tqtxml" not in pytqt_modules:
makefile.extra_defines.append("TQT_MODULE_XML")
- makefile.extra_include_dirs.append(os.path.join(src_dir, "pylupdate3"))
+ makefile.extra_include_dirs.append(os.path.join(src_dir, "pytqlupdate3"))
- if not os.access("pylupdate3", os.F_OK):
- os.mkdir("pylupdate3")
+ if not os.access("pytqlupdate3", os.F_OK):
+ os.mkdir("pytqlupdate3")
makefile.generate()
- tool_dirs.append("pylupdate3")
+ tool_dirs.append("pytqlupdate3")
return tool_dirs
@@ -368,29 +368,29 @@ class ConfigurePyTQt3(ConfigureBase):
def inform_user():
"""Tell the user the option values that are going to be used.
"""
- if qt_edition:
- edstr = qt_edition + " edition "
+ if tqt_edition:
+ edstr = tqt_edition + " edition "
else:
edstr = ""
- sip_tqt_config.inform("TQt v%s %sis being used." % (sip_tqt_config.version_to_string(qt_version), edstr))
+ sip_tqt_config.inform("TQt v%s %sis being used." % (sip_tqt_config.version_to_string(tqt_version), edstr))
sip_tqt_config.inform("SIP-TQt %s is being used." % sipcfg.sip_version_str)
- sip_tqt_config.inform("These PyTQt modules will be built: %s." % ' '.join(pyqt_modules))
+ sip_tqt_config.inform("These PyTQt modules will be built: %s." % ' '.join(pytqt_modules))
if disabled_classes:
sip_tqt_config.inform("Support for these TQt classes has been disabled: %s." % ' '.join(disabled_classes))
- sip_tqt_config.inform("The PyTQt modules will be installed in %s." % opt_pyqtmoddir)
- sip_tqt_config.inform("The PyTQt .sip files will be installed in %s." % opt_pyqtsipdir)
+ sip_tqt_config.inform("The PyTQt modules will be installed in %s." % opt_pytqtmoddir)
+ sip_tqt_config.inform("The PyTQt .sip files will be installed in %s." % opt_pytqtsipdir)
- sip_tqt_config.inform("The TQt header files are in %s." % qt_incdir)
- sip_tqt_config.inform("The %s TQt library is in %s." % (opt_tqtlib, qt_libdir))
+ sip_tqt_config.inform("The TQt header files are in %s." % tqt_incdir)
+ sip_tqt_config.inform("The %s TQt library is in %s." % (opt_tqtlib, tqt_libdir))
- if qt_version >= 0x020000:
- sip_tqt_config.inform("pyuic will be installed in %s." % opt_pyqtbindir)
+ if tqt_version >= 0x020000:
+ sip_tqt_config.inform("pyuic will be installed in %s." % opt_pytqtbindir)
- if qt_version >= 0x030000:
- sip_tqt_config.inform("pylupdate will be installed in %s." % opt_pyqtbindir)
+ if tqt_version >= 0x030000:
+ sip_tqt_config.inform("pylupdate will be installed in %s." % opt_pytqtbindir)
if opt_vendorcheck:
sip_tqt_config.inform("PyTQt will only be usable with signed interpreters.")
@@ -407,64 +407,64 @@ def create_config(module, template, macros):
sip_tqt_config.inform("Creating %s..." % module)
content = {
- "pyqt_config_args": sys.argv[1:],
- "pyqt_version": pyqt_version,
- "pyqt_version_str": pyqt_version_str,
- "pyqt_bin_dir": opt_pyqtbindir,
- "pyqt_mod_dir": opt_pyqtmoddir,
- "pyqt_sip_dir": opt_pyqtsipdir,
- "pyqt_modules": pyqt_modules,
- "pyqt_qt_sip_flags": qt_sip_flags,
- "qt_version": qt_version,
- "qt_edition": qt_edition,
- "qt_winconfig": qt_winconfig,
- "qt_framework": 0,
- "qt_threaded": qt_threaded,
- "qt_dir": qt_dir,
- "qt_inc_dir": qt_incdir,
- "qt_lib": opt_tqtlib,
- "qt_lib_dir": qt_libdir
+ "pytqt_config_args": sys.argv[1:],
+ "pytqt_version": pytqt_version,
+ "pytqt_version_str": pytqt_version_str,
+ "pytqt_bin_dir": opt_pytqtbindir,
+ "pytqt_mod_dir": opt_pytqtmoddir,
+ "pytqt_sip_dir": opt_pytqtsipdir,
+ "pytqt_modules": pytqt_modules,
+ "pytqt_tqt_sip_flags": tqt_sip_flags,
+ "tqt_version": tqt_version,
+ "tqt_edition": tqt_edition,
+ "tqt_winconfig": tqt_winconfig,
+ "tqt_framework": 0,
+ "tqt_threaded": tqt_threaded,
+ "tqt_dir": tqt_dir,
+ "tqt_inc_dir": tqt_incdir,
+ "tqt_lib": opt_tqtlib,
+ "tqt_lib_dir": tqt_libdir
}
- if "qtaxcontainer" in pyqt_modules:
- content["pyqt_qtaxcontainer_sip_flags"] = qt_sip_flags
+ if "tqtaxcontainer" in pytqt_modules:
+ content["pytqt_tqtaxcontainer_sip_flags"] = tqt_sip_flags
- if "qtcanvas" in pyqt_modules:
- content["pyqt_qtcanvas_sip_flags"] = qt_sip_flags
+ if "tqtcanvas" in pytqt_modules:
+ content["pytqt_tqtcanvas_sip_flags"] = tqt_sip_flags
- if "qtext" in pyqt_modules:
- content["pyqt_qtext_sip_flags"] = qtext_sip_flags
+ if "tqtext" in pytqt_modules:
+ content["pytqt_tqtext_sip_flags"] = tqtext_sip_flags
# These are internal.
- content["_pyqt_qscintilla_defines"] = qsci_define
- content["_pyqt_qscintilla_inc_dir"] = opt_qsciincdir
- content["_pyqt_qscintilla_lib_dir"] = opt_qscilibdir
+ content["_pytqt_tqscintilla_defines"] = tqsci_define
+ content["_pytqt_tqscintilla_inc_dir"] = opt_tqsciincdir
+ content["_pytqt_tqscintilla_lib_dir"] = opt_tqscilibdir
- if "qtgl" in pyqt_modules:
- content["pyqt_qtgl_sip_flags"] = qt_sip_flags
+ if "tqtgl" in pytqt_modules:
+ content["pytqt_tqtgl_sip_flags"] = tqt_sip_flags
- if "qtnetwork" in pyqt_modules:
- content["pyqt_qtnetwork_sip_flags"] = qt_sip_flags
+ if "tqtnetwork" in pytqt_modules:
+ content["pytqt_tqtnetwork_sip_flags"] = tqt_sip_flags
- if "qtpe" in pyqt_modules:
- content["pyqt_qtpe_sip_flags"] = qtpe_sip_flags
+ if "tqtpe" in pytqt_modules:
+ content["pytqt_tqtpe_sip_flags"] = tqtpe_sip_flags
- if "qtsql" in pyqt_modules:
- content["pyqt_qtsql_sip_flags"] = qt_sip_flags
+ if "tqtstql" in pytqt_modules:
+ content["pytqt_tqtsql_sip_flags"] = tqt_sip_flags
- if "qttable" in pyqt_modules:
- content["pyqt_qttable_sip_flags"] = qt_sip_flags
+ if "tqttable" in pytqt_modules:
+ content["pytqt_tqttable_sip_flags"] = tqt_sip_flags
- if "qtui" in pyqt_modules:
- content["pyqt_qtui_sip_flags"] = qt_sip_flags
+ if "tqtui" in pytqt_modules:
+ content["pytqt_tqtui_sip_flags"] = tqt_sip_flags
- if "qtxml" in pyqt_modules:
- content["pyqt_qtxml_sip_flags"] = qt_sip_flags
+ if "tqtxml" in pytqt_modules:
+ content["pytqt_tqtxml_sip_flags"] = tqt_sip_flags
sip_tqt_config.create_config_module(module, template, content, macros)
-def compile_qt_program(name, define=None, include_dir=None, lib_dir=None, lib=None, opengl=0, python=0, debug=0):
+def compile_tqt_program(name, define=None, include_dir=None, lib_dir=None, lib=None, opengl=0, python=0, debug=0):
"""Compile a simple TQt application.
name is the name of the single source file.
@@ -481,7 +481,7 @@ def compile_qt_program(name, define=None, include_dir=None, lib_dir=None, lib=No
Returns the name of the executable suitable for running or None if it
wasn't created.
"""
- makefile = sip_tqt_config.ProgramMakefile(sipcfg, console=1, qt=1, warnings=0, opengl=opengl, python=python, debug=debug)
+ makefile = sip_tqt_config.ProgramMakefile(sipcfg, console=1, tqt=1, warnings=0, opengl=opengl, python=python, debug=debug)
if define:
makefile.extra_defines.append(define)
@@ -537,38 +537,38 @@ def compile_qt_program(name, define=None, include_dir=None, lib_dir=None, lib=No
return exe
-def check_qscintilla():
+def check_tqscintilla():
"""See if TQScintilla can be found and what its version is.
"""
# Set the defaults if they haven't been explicitly specified.
- global opt_qsciincdir, opt_qscilibdir
+ global opt_tqsciincdir, opt_tqscilibdir
- if opt_qsciincdir is None:
- opt_qsciincdir = qt_incdir
+ if opt_tqsciincdir is None:
+ opt_tqsciincdir = tqt_incdir
- if opt_qscilibdir is None:
- opt_qscilibdir = qt_libdir
+ if opt_tqscilibdir is None:
+ opt_tqscilibdir = tqt_libdir
# Find the TQScintilla header files.
- sciglobal = os.path.join(opt_qsciincdir, "tqextscintillaglobal.h")
+ sciglobal = os.path.join(opt_tqsciincdir, "tqextscintillaglobal.h")
if os.access(sciglobal, os.F_OK):
# Get the TQScintilla version number.
- global qsci_version
+ global tqsci_version
- qsci_version, sciversstr = sip_tqt_config.read_version(sciglobal, "TQScintilla", "TQSCINTILLA_VERSION", "TQSCINTILLA_VERSION_STR")
+ tqsci_version, sciversstr = sip_tqt_config.read_version(sciglobal, "TQScintilla", "TQSCINTILLA_VERSION", "TQSCINTILLA_VERSION_STR")
- if glob.glob(os.path.join(opt_qscilibdir, "*tqscintilla*")):
+ if glob.glob(os.path.join(opt_tqscilibdir, "*tqscintilla*")):
sip_tqt_config.inform("TQScintilla %s is being used." % sciversstr)
# If we find a snapshot then set a negative version number as a
# special case.
if sciversstr.find("snapshot") >= 0:
- qsci_version = -1
+ tqsci_version = -1
else:
- sip_tqt_config.inform("The TQScintilla library could not be found in %s and so the qtext module will not be built. If TQScintilla is installed then use the -o argument to explicitly specify the correct directory." % opt_qscilibdir)
+ sip_tqt_config.inform("The TQScintilla library could not be found in %s and so the tqtext module will not be built. If TQScintilla is installed then use the -o argument to explicitly specify the correct directory." % opt_tqscilibdir)
else:
- sip_tqt_config.inform("tqextscintillaglobal.h could not be found in %s and so the qtext module will not be built. If TQScintilla is installed then use the -n argument to explicitly specify the correct directory." % opt_qsciincdir)
+ sip_tqt_config.inform("tqextscintillaglobal.h could not be found in %s and so the tqtext module will not be built. If TQScintilla is installed then use the -n argument to explicitly specify the correct directory." % opt_tqsciincdir)
def check_vendorid():
@@ -608,10 +608,10 @@ def check_module(mname, incfile, ctor, define=None, include_dir=None, lib_dir=No
sip_tqt_config.inform("Checking to see if the %s module should be built..." % mname)
if check_class(incfile, ctor, define, include_dir, lib_dir, lib, opengl):
- pyqt_modules.append(mname)
+ pytqt_modules.append(mname)
else:
if check_class("nt" + incfile, ctor, define, include_dir, lib_dir, lib, opengl):
- pyqt_modules.append(mname)
+ pytqt_modules.append(mname)
def check_class(incfile, ctor, define=None, include_dir=None, lib_dir=None, lib=None, opengl=0):
@@ -641,7 +641,7 @@ int main(int argc, char **argv)
f.close()
- return compile_qt_program(cfgtest, define, include_dir, lib_dir, lib, opengl)
+ return compile_tqt_program(cfgtest, define, include_dir, lib_dir, lib, opengl)
def check_plugin(cname, incfile):
@@ -735,7 +735,7 @@ int main(int argc,char **argv)
f.close()
# Build the program.
- exe = compile_qt_program("mkfeatures.cpp", include_dir=sipcfg.py_inc_dir, python=1)
+ exe = compile_tqt_program("mkfeatures.cpp", include_dir=sipcfg.py_inc_dir, python=1)
if not exe:
sip_tqt_config.error("Unable to build mkfeatures utility.")
@@ -746,14 +746,14 @@ int main(int argc,char **argv)
sip_tqt_config.error("There was an error creating the features file.")
# Check what features have been implemented as plugins and disable them.
- plugins = [("STYLE_CDE", "qcdestyle.h", "TQCDEStyle"),
- ("STYLE_INTERLACE", "qinterlacestyle.h", "TQInterlaceStyle"),
- ("STYLE_MOTIF", "qmotifstyle.h", "TQMotifStyle"),
- ("STYLE_MOTIFPLUS", "qmotifplusstyle.h", "TQMotifPlusStyle"),
- ("STYLE_PLATINUM", "qplatinumstyle.h", "TQPlatinumStyle"),
- ("STYLE_SGI", "qsgistyle.h", "TQSGIStyle"),
- ("STYLE_WINDOWSXP", "qwindowsxpstyle.h", "TQWindowsXPStyle"),
- ("STYLE_WINDOWS", "qwindowsstyle.h", "TQWindowsStyle")]
+ plugins = [("STYLE_CDE", "tqcdestyle.h", "TQCDEStyle"),
+ ("STYLE_INTERLACE", "tqinterlacestyle.h", "TQInterlaceStyle"),
+ ("STYLE_MOTIF", "tqmotifstyle.h", "TQMotifStyle"),
+ ("STYLE_MOTIFPLUS", "tqmotifplusstyle.h", "TQMotifPlusStyle"),
+ ("STYLE_PLATINUM", "tqplatinumstyle.h", "TQPlatinumStyle"),
+ ("STYLE_SGI", "tqsgistyle.h", "TQSGIStyle"),
+ ("STYLE_WINDOWSXP", "tqwindowsxpstyle.h", "TQWindowsXPStyle"),
+ ("STYLE_WINDOWS", "tqwindowsstyle.h", "TQWindowsStyle")]
f = open(name, "a")
@@ -797,16 +797,16 @@ def get_feature_flags():
def set_sip_flags():
"""Set the SIP-TQt platform, version and feature flags.
"""
- qt_sip_flags.extend(pyqt.sip_flags())
+ tqt_sip_flags.extend(pytqt.sip_flags())
# If we don't check for signed interpreters, we exclude the 'VendorID'
# feature
if not opt_vendorcheck:
- qt_sip_flags.append("-x")
- qt_sip_flags.append("VendorID")
+ tqt_sip_flags.append("-x")
+ tqt_sip_flags.append("VendorID")
# Handle the platform tag.
- if opt_qtpetag:
+ if opt_tqtpetag:
plattag = "WS_QWS"
elif sys.platform == "win32":
plattag = "WS_WIN"
@@ -818,24 +818,24 @@ def set_sip_flags():
else:
plattag = "WS_X11"
- qt_sip_flags.append("-t")
- qt_sip_flags.append(plattag)
+ tqt_sip_flags.append("-t")
+ tqt_sip_flags.append(plattag)
# Handle the TQt version tag.
- verstag = sip_tqt_config.version_to_sip_tag(qt_version, pyqt.qt_version_tags(), "TQt")
+ verstag = sip_tqt_config.version_to_sip_tag(tqt_version, pytqt.tqt_version_tags(), "TQt")
if verstag:
- qt_sip_flags.append("-t")
- qt_sip_flags.append(verstag)
+ tqt_sip_flags.append("-t")
+ tqt_sip_flags.append(verstag)
# The flags so far are common.
- for f in qt_sip_flags:
- qtext_sip_flags.append(f)
- qtpe_sip_flags.append(f)
+ for f in tqt_sip_flags:
+ tqtext_sip_flags.append(f)
+ tqtpe_sip_flags.append(f)
# Handle the TQScintilla version tag.
- if qsci_version:
- qscitags = {
+ if tqsci_version:
+ tqscitags = {
0x010100: None,
0x010200: "TQScintilla_1_1",
0x010300: "TQScintilla_1_2",
@@ -846,16 +846,16 @@ def set_sip_flags():
0x020000: "TQScintilla_1_7"
}
- verstag = sip_tqt_config.version_to_sip_tag(qsci_version, qscitags, "TQScintilla")
+ verstag = sip_tqt_config.version_to_sip_tag(tqsci_version, tqscitags, "TQScintilla")
if verstag:
- qtext_sip_flags.append("-t")
- qtext_sip_flags.append(verstag)
+ tqtext_sip_flags.append("-t")
+ tqtext_sip_flags.append(verstag)
# Handle the TQtopia tag.
- if opt_qtpetag:
- qtpe_sip_flags.append("-t")
- qtpe_sip_flags.append(opt_qtpetag)
+ if opt_tqtpetag:
+ tqtpe_sip_flags.append("-t")
+ tqtpe_sip_flags.append(opt_tqtpetag)
def generate_code(mname, extra_cflags=None, extra_cxxflags=None, extra_define=None, extra_include_dirs=None, extra_lflags=None, extra_lib_dir=None, extra_libs=None, opengl=0, sip_flags=None):
@@ -891,7 +891,7 @@ def generate_code(mname, extra_cflags=None, extra_cxxflags=None, extra_define=No
argv = ['"' + sipcfg.sip_bin + '"']
if sip_flags is None:
- sip_flags = qt_sip_flags
+ sip_flags = tqt_sip_flags
argv.extend(sip_flags)
@@ -930,15 +930,15 @@ def generate_code(mname, extra_cflags=None, extra_cxxflags=None, extra_define=No
for s in glob.glob("sip/" + mname + "/*.sip"):
sipfiles.append(os.path.join(src_dir, "sip", mname, os.path.basename(s)))
- installs.append([sipfiles, os.path.join(pyqt.sip_dir(), mname)])
+ installs.append([sipfiles, os.path.join(pytqt.sip_dir(), mname)])
makefile = sip_tqt_config.SIPModuleMakefile(
configuration=sipcfg,
build_file=mname + ".sbf",
dir=mname,
- install_dir=pyqt.module_dir(),
+ install_dir=pytqt.module_dir(),
installs=installs,
- qt=1,
+ tqt=1,
opengl=opengl,
warnings=1,
static=opt_static,
@@ -989,20 +989,20 @@ def check_license():
lname = "GNU General Public License"
lfile = None
- sip_tqt_config.inform("This is the %s version of PyTQt %s (licensed under the %s) for Python %s on %s." % (ltype, pyqt_version_str, lname, sys.version[0].split(), sys.platform))
+ sip_tqt_config.inform("This is the %s version of PyTQt %s (licensed under the %s) for Python %s on %s." % (ltype, pytqt_version_str, lname, sys.version[0].split(), sys.platform))
# Common checks.
if ltype == "GPL" and sys.platform == "win32":
error("You cannot use the GPL version of PyTQt under Windows.")
try:
- qted = qt_edition
+ tqted = tqt_edition
except AttributeError:
- qted = None
+ tqted = None
- if qted and ltype != "internal":
- if (qted == "free" and ltype != "GPL") or (qted != "free" and ltype == "GPL"):
- sip_tqt_config.error("This version of PyTQt and the %s edition of TQt have incompatible licenses." % qted)
+ if tqted and ltype != "internal":
+ if (tqted == "free" and ltype != "GPL") or (tqted != "free" and ltype == "GPL"):
+ sip_tqt_config.error("This version of PyTQt and the %s edition of TQt have incompatible licenses." % tqted)
# Confirm the license.
sys.stdout.write("""
@@ -1050,9 +1050,9 @@ def get_build_macros(overrides):
"""
# Get the name of the qmake configuration file to take the macros from.
if "QMAKESPEC" in list(os.environ.keys()):
- fname = os.path.join(qt_dir, "mkspecs", os.environ["QMAKESPEC"], "qmake.conf")
+ fname = os.path.join(tqt_dir, "mkspecs", os.environ["QMAKESPEC"], "qmake.conf")
else:
- fname = os.path.join(qt_dir, "mkspecs", "default", "qmake.conf")
+ fname = os.path.join(tqt_dir, "mkspecs", "default", "qmake.conf")
if not os.access(fname, os.F_OK):
sip_tqt_config.error("Unable to find the default configuration file %s. You can use the QMAKESPEC environment variable to specify the correct platform instead of \"default\"." % fname)
@@ -1064,18 +1064,18 @@ def get_build_macros(overrides):
names.append("MOC")
# Make sure $TQTDIR reflects any directory passed on the command line.
- os.environ["TQTDIR"] = qt_dir
+ os.environ["TQTDIR"] = tqt_dir
properties = {
- "QT_INSTALL_BINS": os.path.join(qt_dir, "bin"),
- "QT_INSTALL_HEADERS": os.path.join(qt_dir, "include"),
- "QT_INSTALL_LIBS": os.path.join(qt_dir, "lib")
+ "TQT_INSTALL_BINS": os.path.join(tqt_dir, "bin"),
+ "TQT_INSTALL_HEADERS": os.path.join(tqt_dir, "include"),
+ "TQT_INSTALL_LIBS": os.path.join(tqt_dir, "lib")
}
return sip_tqt_config.parse_build_macros(fname, names, overrides, properties)
-def check_qt_installation(macros):
+def check_tqt_installation(macros):
"""Check the TQt installation and get the version number and edition.
macros is the dictionary of build macros.
@@ -1084,97 +1084,97 @@ def check_qt_installation(macros):
generator = macros["MAKEFILE_GENERATOR"]
# Set the TQt include and lib directories.
- global qt_incdir, qt_libdir
+ global tqt_incdir, tqt_libdir
- qt_incdir = macros["INCDIR_TQT"]
+ tqt_incdir = macros["INCDIR_TQT"]
- if not qt_incdir:
- qt_incdir = os.path.join(qt_dir, "include")
- macros["INCDIR_TQT"] = qt_incdir
+ if not tqt_incdir:
+ tqt_incdir = os.path.join(tqt_dir, "include")
+ macros["INCDIR_TQT"] = tqt_incdir
- qt_libdir = macros["LIBDIR_TQT"]
+ tqt_libdir = macros["LIBDIR_TQT"]
- if not qt_libdir:
- qt_libdir = os.path.join(qt_dir, "lib")
- macros["LIBDIR_TQT"] = qt_libdir
+ if not tqt_libdir:
+ tqt_libdir = os.path.join(tqt_dir, "lib")
+ macros["LIBDIR_TQT"] = tqt_libdir
# Check the TQt header files have been installed. Quietly check for TQt v4.
- qt4_d = os.path.join(qt_incdir, "TQtCore")
+ tqt4_d = os.path.join(tqt_incdir, "TQtCore")
- qglobal = os.path.join(qt4_d, "qglobal.h")
+ tqglobal = os.path.join(tqt4_d, "tqglobal.h")
- if not os.access(qglobal, os.F_OK):
- qglobal = os.path.join(qt_incdir, "qglobal.h")
+ if not os.access(tqglobal, os.F_OK):
+ tqglobal = os.path.join(tqt_incdir, "tqglobal.h")
- if not os.access(qglobal, os.F_OK):
- qglobal = os.path.join(qt_incdir, "ntqglobal.h")
+ if not os.access(tqglobal, os.F_OK):
+ tqglobal = os.path.join(tqt_incdir, "ntqglobal.h")
- if not os.access(qglobal, os.F_OK):
- sip_tqt_config.error("qglobal.h or ntqglobal.h could not be found in %s." % qt_incdir)
+ if not os.access(tqglobal, os.F_OK):
+ sip_tqt_config.error("tqglobal.h or ntqglobal.h could not be found in %s." % tqt_incdir)
# Get the TQt version number.
- global qt_version
+ global tqt_version
- qt_version, ignore = sip_tqt_config.read_version(qglobal, "TQt", "TQT_VERSION")
+ tqt_version, ignore = sip_tqt_config.read_version(tqglobal, "TQt", "TQT_VERSION")
# Early versions of TQt for the Mac didn't include everything. Rather than
# maintain these in the future we just mandate a later version.
- if sys.platform == "darwin" and qt_version < 0x030100:
+ if sys.platform == "darwin" and tqt_version < 0x030100:
sip_tqt_config.error("PyTQt for MacOS/X requires TQt v3.1.0 or later.")
# The way SIP-TQt v4.2 and later handle connections between signals and Python
# slots only works with TQt v3 and later. Therefore TQt v2 and earlier needs
# SIP-TQt v3.
- if qt_version < 0x030000:
+ if tqt_version < 0x030000:
sip_tqt_config.error("TQt v2.x and earlier require SIP-TQt v3.x.")
- if qt_version >= 0x040000:
- sip_tqt_config.error("TQt v4.x requires PyTQt v4.x.")
+ if tqt_version >= 0x040000:
+ sip_tqt_config.error("TQt v4.x requires PyTQt v5.x.")
# Try and work out which edition it is.
- global qt_edition
+ global tqt_edition
- if qt_version >= 0x030000:
- if opt_qconfigdir:
- qconfigdir = opt_qconfigdir
+ if tqt_version >= 0x030000:
+ if opt_tqconfigdir:
+ tqconfigdir = opt_tqconfigdir
else:
- qconfigdir = qt_incdir
+ tqconfigdir = tqt_incdir
- qconfig = os.path.join(qconfigdir, "qconfig.h")
+ tqconfig = os.path.join(tqconfigdir, "tqconfig.h")
- if not os.access(qconfig,os.F_OK):
- qconfig = os.path.join(qconfigdir, "ntqconfig.h")
+ if not os.access(tqconfig,os.F_OK):
+ tqconfig = os.path.join(tqconfigdir, "ntqconfig.h")
- if not os.access(qconfig,os.F_OK):
- sip_tqt_config.error("qconfig.h or ntqconfig.h could not be found in %s." % qconfigdir)
+ if not os.access(tqconfig,os.F_OK):
+ sip_tqt_config.error("tqconfig.h or ntqconfig.h could not be found in %s." % tqconfigdir)
- f = open(qconfig)
+ f = open(tqconfig)
l = f.readline()
while l:
wl = l.split()
if len(wl) == 3 and wl[0] == "#define" and wl[1] == "QT_PRODUCT_LICENSE":
- qt_edition = wl[2][4:-1]
+ tqt_edition = wl[2][4:-1]
break
l = f.readline()
f.close()
- if not qt_edition:
- sip_tqt_config.error("The TQt edition could not be determined by parsing %s." % qconfig)
- elif qt_version == 0x020300 and sys.platform == "win32":
+ if not tqt_edition:
+ sip_tqt_config.error("The TQt edition could not be determined by parsing %s." % tqconfig)
+ elif tqt_version == 0x020300 and sys.platform == "win32":
# See if we have the TQt v2 non-commercial version.
- if os.access(os.path.join(qt_libdir, "qt-mt230nc.lib"), os.F_OK):
- qt_edition = "non-commercial"
+ if os.access(os.path.join(tqt_libdir, "tqt-mt230nc.lib"), os.F_OK):
+ tqt_edition = "non-commercial"
if sys.platform == "win32":
# Work out how TQt was built on Windows.
- global qt_winconfig
+ global tqt_winconfig
try:
- f = open(os.path.join(qt_dir, ".qtwinconfig"), "r")
+ f = open(os.path.join(tqt_dir, ".tqtwinconfig"), "r")
except IOError:
f = None
@@ -1185,37 +1185,37 @@ def check_qt_installation(macros):
val = cfg.find("=")
if val >= 0:
- qt_winconfig = string.strip(cfg[val + 1:])
+ tqt_winconfig = string.strip(cfg[val + 1:])
else:
# Assume it was built as a DLL.
- qt_winconfig = "shared"
+ tqt_winconfig = "shared"
# Determine the TQt library to link against and if it has thread support.
- global qt_threaded
+ global tqt_threaded
- resolve_qt3_library(generator)
+ resolve_tqt3_library(generator)
- if opt_tqtlib in ("qt-mt", "qt-mtedu", "qt-mteval", "qte-mt", "qtmt", "qtmtedu", "qtmteval", "tqt-mt", "tqt-mtedu", "tqt-mteval", "tqte-mt", "tqtmt", "tqtmtedu", "tqtmteval"):
- qt_threaded = 1
+ if opt_tqtlib in ("tqt-mt", "tqt-mtedu", "tqt-mteval", "tqte-mt", "tqtmt", "tqtmtedu", "tqtmteval", "tqt-mt", "tqt-mtedu", "tqt-mteval", "tqte-mt", "tqtmt", "tqtmtedu", "tqtmteval"):
+ tqt_threaded = 1
- global pyqt
+ global pytqt
- pyqt = ConfigurePyTQt3()
+ pytqt = ConfigurePyTQt3()
# We haven't yet factored out sip_tqt_config's knowledge of how to build TQt
# binaries and it is expecting to find these in the configuration when it
# generates the Makefiles.
- sipcfg.qt_version = qt_version
- sipcfg.qt_edition = qt_edition
- sipcfg.qt_winconfig = qt_winconfig
- sipcfg.qt_framework = 0
- sipcfg.qt_threaded = qt_threaded
- sipcfg.qt_dir = qt_dir
- sipcfg.qt_lib = opt_tqtlib
- sipcfg.qt_lib_dir = qt_libdir
+ sipcfg.tqt_version = tqt_version
+ sipcfg.tqt_edition = tqt_edition
+ sipcfg.tqt_winconfig = tqt_winconfig
+ sipcfg.tqt_framework = 0
+ sipcfg.tqt_threaded = tqt_threaded
+ sipcfg.tqt_dir = tqt_dir
+ sipcfg.tqt_lib = opt_tqtlib
+ sipcfg.tqt_lib_dir = tqt_libdir
-def resolve_qt3_library(generator):
+def resolve_tqt3_library(generator):
"""See which version of the TQt v3 library can be found. (We can't trust
the configuration files.)
@@ -1224,20 +1224,20 @@ def resolve_qt3_library(generator):
global opt_tqtlib
if opt_tqtlib:
- if not is_qt_library(generator, opt_tqtlib):
- sip_tqt_config.error("The %s TQt library could not be found in %s." % (opt_tqtlib, qt_libdir))
+ if not is_tqt_library(generator, opt_tqtlib):
+ sip_tqt_config.error("The %s TQt library could not be found in %s." % (opt_tqtlib, tqt_libdir))
else:
- stlib = is_qt_library(generator, "tqt")
- mtlib = is_qt_library(generator, "tqt-mt")
- edlib = is_qt_library(generator, "tqt-mtedu")
- evlib = is_qt_library(generator, "tqt-mteval")
- emlib = is_qt_library(generator, "tqte")
- etlib = is_qt_library(generator, "tqte-mt")
+ stlib = is_tqt_library(generator, "tqt")
+ mtlib = is_tqt_library(generator, "tqt-mt")
+ edlib = is_tqt_library(generator, "tqt-mtedu")
+ evlib = is_tqt_library(generator, "tqt-mteval")
+ emlib = is_tqt_library(generator, "tqte")
+ etlib = is_tqt_library(generator, "tqte-mt")
# Borland likes to be a little different.
- bmtlib = is_qt_library(generator, "tqtmt")
- bedlib = is_qt_library(generator, "tqtmtedu")
- bevlib = is_qt_library(generator, "tqtmteval")
+ bmtlib = is_tqt_library(generator, "tqtmt")
+ bedlib = is_tqt_library(generator, "tqtmtedu")
+ bevlib = is_tqt_library(generator, "tqtmteval")
names = []
@@ -1278,13 +1278,13 @@ def resolve_qt3_library(generator):
names.append(opt_tqtlib)
if not names:
- sip_tqt_config.error("No TQt libraries could be found in %s." % qt_libdir)
+ sip_tqt_config.error("No TQt libraries could be found in %s." % tqt_libdir)
if len(names) > 1:
sip_tqt_config.error("These TQt libraries were found: %s. Use the -y argument to explicitly specify which you want to use." % ' '.join(names))
-def is_qt_library(generator, lib):
+def is_tqt_library(generator, lib):
"""See if a particular TQt library is installed.
generator is the name of the Makefile generator.
@@ -1296,7 +1296,7 @@ def is_qt_library(generator, lib):
lpatts = ["lib" + lib + ".*"]
for lpatt in lpatts:
- lmatch = glob.glob(os.path.join(qt_libdir, lpatt))
+ lmatch = glob.glob(os.path.join(tqt_libdir, lpatt))
if lmatch:
return lmatch
@@ -1320,11 +1320,11 @@ def main(argv):
except getopt.GetoptError:
usage()
- global qt_dir, opt_tqtlib, opt_qconfigdir
- global opt_pyqtbindir, opt_pyqtmoddir, opt_pyqtsipdir
- global opt_qtpetag, opt_static, opt_debug, opt_concat
+ global tqt_dir, opt_tqtlib, opt_tqconfigdir
+ global opt_pytqtbindir, opt_pytqtmoddir, opt_pytqtsipdir
+ global opt_tqtpetag, opt_static, opt_debug, opt_concat
global opt_split, opt_tracing, opt_verbose, opt_keepfeatures
- global opt_qsciincdir, opt_qscilibdir, qsci_define
+ global opt_tqsciincdir, opt_tqscilibdir, tqsci_define
global opt_vendorcheck, opt_vendincdir, opt_vendlibdir
global opt_libpython
global opt_accept_license
@@ -1335,19 +1335,19 @@ def main(argv):
if opt == "-h":
usage(0)
elif opt == "-a":
- opt_qtpetag = arg
+ opt_tqtpetag = arg
elif opt == "-b":
- opt_pyqtbindir = os.path.abspath(arg)
+ opt_pytqtbindir = os.path.abspath(arg)
elif opt == "-c":
opt_concat = 1
elif opt == "-d":
- opt_pyqtmoddir = os.path.abspath(arg)
+ opt_pytqtmoddir = os.path.abspath(arg)
elif opt == "-e":
opt_libpython = arg
elif opt == "-f":
opt_keepfeatures = 1
elif opt == "-g":
- opt_qconfigdir = os.path.abspath(arg)
+ opt_tqconfigdir = os.path.abspath(arg)
elif opt == "-i":
opt_vendorcheck = 1
elif opt == "-j":
@@ -1362,23 +1362,23 @@ def main(argv):
elif opt == "-m":
opt_vendlibdir = arg
elif opt == "-n":
- opt_qsciincdir = arg
+ opt_tqsciincdir = arg
elif opt == "-o":
- opt_qscilibdir = arg
+ opt_tqscilibdir = arg
elif opt == "-q":
- qt_dir = os.path.abspath(arg)
+ tqt_dir = os.path.abspath(arg)
elif opt == "-r":
opt_tracing = 1
elif opt == "-s":
- qsci_define = ""
+ tqsci_define = ""
elif opt == "-u":
opt_debug = 1
elif opt == "-v":
- opt_pyqtsipdir = os.path.abspath(arg)
+ opt_pytqtsipdir = os.path.abspath(arg)
elif opt == "-w":
opt_verbose = 1
elif opt == "-y":
- if arg in ("qt", "qt-mt", "qt-mtedu", "qt-mteval", "qte", "qte-mt", "qtmt", "qtmtedu", "tqt", "tqt-mt", "tqt-mtedu", "tqt-mteval", "tqte", "tqte-mt", "tqtmt", "tqtmtedu"):
+ if arg in ("tqt", "tqt-mt", "tqt-mtedu", "tqt-mteval", "tqte", "tqte-mt", "tqtmt", "tqtmtedu", "tqt", "tqt-mt", "tqt-mtedu", "tqt-mteval", "tqte", "tqte-mt", "tqtmt", "tqtmtedu"):
opt_tqtlib = arg
else:
usage()
@@ -1386,7 +1386,7 @@ def main(argv):
opt_accept_license = 1
# Check that we know the name of the TQt root directory.
- if not qt_dir:
+ if not tqt_dir:
sip_tqt_config.error("A TQt installation could not be found. Use use the -q argument or the TQTDIR environment variable to explicitly specify the correct directory.")
# When building static libraries, signed interpreter checking makes no
@@ -1403,7 +1403,7 @@ def main(argv):
sipcfg.set_build_macros(macros)
# Check TQt is what we need.
- check_qt_installation(macros)
+ check_tqt_installation(macros)
# Check the licenses are compatible.
if opt_accept_license == 1:
@@ -1412,10 +1412,10 @@ def main(argv):
check_license()
# Check for TQScintilla.
- check_qscintilla()
+ check_tqscintilla()
# Check which modules to build.
- qtmod_lib = pyqt.check_modules()
+ tqtmod_lib = pytqt.check_modules()
# Check for the VendorID package.
check_vendorid()
@@ -1431,8 +1431,8 @@ def main(argv):
extra_include_dirs = []
extra_libs = []
- if qtmod_lib:
- extra_libs.append(qtmod_lib)
+ if tqtmod_lib:
+ extra_libs.append(tqtmod_lib)
if opt_libpython:
extra_libs.append(opt_libpython)
@@ -1444,22 +1444,22 @@ def main(argv):
else:
extra_lib_dir = None
- pyqt.code(extra_include_dirs, extra_lib_dir, extra_libs)
+ pytqt.code(extra_include_dirs, extra_lib_dir, extra_libs)
# Create the additional Makefiles.
sip_tqt_config.inform("Creating top level Makefile...")
sip_tqt_config.ParentMakefile(
configuration=sipcfg,
- subdirs=pyqt_modules + pyqt.tools(),
- installs=(pyqt.module_installs(), pyqt.module_dir())
+ subdirs=pytqt_modules + pytqt.tools(),
+ installs=(pytqt.module_installs(), pytqt.module_dir())
).generate()
# Install module initialization script.
create_config("__init__.py", os.path.join(src_dir, "module-init.py"), macros)
# Install the configuration module.
- create_config("pyqtconfig.py", os.path.join(src_dir, "pyqtconfig.py.in"), macros)
+ create_config("pytqtconfig.py", os.path.join(src_dir, "pytqtconfig.py.in"), macros)
###############################################################################