summaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
Diffstat (limited to 'configure.py')
-rw-r--r--configure.py314
1 files changed, 157 insertions, 157 deletions
diff --git a/configure.py b/configure.py
index cbbc1c2..e991a85 100644
--- a/configure.py
+++ b/configure.py
@@ -1,22 +1,22 @@
-# This script generates the PyQt configuration and generates the Makefiles.
+# This script generates the PyTQt configuration and generates the Makefiles.
#
# Copyright (c) 2007
# Riverbank Computing Limited <info@riverbankcomputing.co.uk>
#
-# This file is part of PyQt.
+# This file is part of PyTQt.
#
-# This copy of PyQt is free software; you can redistribute it and/or modify it
+# This copy of PyTQt is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2, or (at your option) any later
# version.
#
-# PyQt is supplied in the hope that it will be useful, but WITHOUT ANY
+# PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
-# PyQt; see the file LICENSE. If not, write to the Free Software Foundation,
+# PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -39,7 +39,7 @@ pyqt_version_str = "3.18.1"
sip_min_version = 0x040800
-# Try and find a Qt installation to use as the default.
+# Try and find a TQt installation to use as the default.
try:
qt_dir = os.environ["QTDIR"]
except KeyError:
@@ -62,7 +62,7 @@ qsci_version = 0
disabled_classes = []
if sys.platform == "win32":
- qsci_define = "QEXTSCINTILLA_DLL"
+ qsci_define = "TQEXTSCINTILLA_DLL"
else:
qsci_define = ""
@@ -108,29 +108,29 @@ def usage(rcode = 2):
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(" -c concatenate each module's C/C++ source files\n")
- sys.stdout.write(" -d dir where the PyQt modules will be installed [default %\ns]" % opt_pyqtmoddir)
+ sys.stdout.write(" -d dir where the PyTQt modules will be installed [default %\ns]" % opt_pyqtmoddir)
sys.stdout.write(" -f keep any existing features file (when cross-compiling) [default remove]\n")
- sys.stdout.write(" -g dir where the Qt qconfig.h file can be found [default Qt include directory]\n")
+ sys.stdout.write(" -g dir where the TQt qconfig.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 PyQt modules as static libraries\n")
+ sys.stdout.write(" -k build the PyTQt modules as static libraries\n")
sys.stdout.write(" -l dir the directory containing the VendorID header file [default %s]\n" % opt_vendincdir)
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 QScintilla header files [default Qt include directory]\n")
- sys.stdout.write(" -o dir the directory containing the QScintilla library [default Qt lib directory]\n")
- sys.stdout.write(" -q dir the root directory of the Qt installation [default %s]\n" % def_qt_dir)
+ 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(" -r generate code with tracing enabled [default disabled]\n")
- sys.stdout.write(" -s QScintilla 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 PyQt .sip files will be installed [default %s]\n" % opt_pyqtsipdir)
+ sys.stdout.write(" -s TQScintilla is a static library and not a DLL (Windows only)\n")
+ sys.stdout.write(" -u build with debugging symbols (retquires 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(" -w don't suppress compiler output during configuration\n")
- sys.stdout.write(" -y lib explicitly specify the type of Qt library, either qt, qt-mt, qte, qte-mt or qtmt\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.exit(rcode)
class ConfigureBase:
- """This is the base class for all PyQt version specific configurer classes.
+ """This is the base class for all PyTQt version specific configurer classes.
Anything here is common to all configurers.
"""
def check_modules(self):
@@ -192,26 +192,26 @@ class ConfigureBase:
return opt_pyqtsipdir
-class ConfigurePyQt3(ConfigureBase):
- """This class defines the methods to configure PyQt v3.
+class ConfigurePyTQt3(ConfigureBase):
+ """This class defines the methods to configure PyTQt v3.
"""
def check_modules(self):
pyqt_modules.append("qt")
- check_module("qtcanvas", "qcanvas.h", "QCanvas()")
- check_module("qtnetwork", "qsocket.h", "QSocket()")
- check_module("qttable", "qtable.h", "QTable()")
- check_module("qtxml", "qdom.h", "QDomImplementation()")
- check_module("qtgl", "qgl.h", "QGLWidget()", opengl=1)
+ 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)
if qt_version >= 0x030000:
- check_module("qtui", "qwidgetfactory.h", "QWidgetFactory()", lib="qui")
+ check_module("qtui", "qwidgetfactory.h", "TQWidgetFactory()", lib="tqui")
if qt_edition in ("enterprise", "free"):
- check_module("qtsql", "qsql.h", "QSql()")
+ check_module("qtsql", "qsql.h", "TQSql()")
if sys.platform == "win32" and sipcfg.sip_version >= 0x040200:
- check_module("qtaxcontainer", "qaxobject.h", "QAxObject()", lib="qaxcontainer")
+ check_module("qtaxcontainer", "qaxobject.h", "TQAxObject()", lib="qaxcontainer")
if qsci_version:
check_module("qtext", "qextscintillabase.h", "QextScintillaBase()", define=qsci_define, include_dir=opt_qsciincdir, lib_dir=opt_qscilibdir, lib="qscintilla")
@@ -222,12 +222,12 @@ class ConfigurePyQt3(ConfigureBase):
qtmod_lib = None
if qt_version >= 0x030100:
- sipconfig.inform("Checking to see if the QAssistantClient class is available...")
+ sipconfig.inform("Checking to see if the TQAssistantClient class is available...")
- if check_class("qassistantclient.h", "QAssistantClient(\"foo\")", lib="qassistantclient"):
+ if check_class("qassistantclient.h", "TQAssistantClient(\"foo\")", lib="qassistantclient"):
qtmod_lib = "qassistantclient"
else:
- disabled_classes.append("QAssistantClient")
+ disabled_classes.append("TQAssistantClient")
return qtmod_lib
@@ -237,25 +237,25 @@ class ConfigurePyQt3(ConfigureBase):
def qt_version_tags(self):
return {
0x010403: None,
- 0x020000: "Qt_1_43",
- 0x020100: "Qt_2_00",
- 0x020200: "Qt_2_1_0",
- 0x020300: "Qt_2_2_0",
- 0x020301: "Qt_2_3_0",
- 0x030000: "Qt_2_3_1",
- 0x030001: "Qt_3_0_0",
- 0x030002: "Qt_3_0_1",
- 0x030004: "Qt_3_0_2",
- 0x030005: "Qt_3_0_4",
- 0x030006: "Qt_3_0_5",
- 0x030100: "Qt_3_0_6",
- 0x030101: "Qt_3_1_0",
- 0x030102: "Qt_3_1_1",
- 0x030200: "Qt_3_1_2",
- 0x030300: "Qt_3_2_0",
- 0x030305: "Qt_3_3_0",
- 0x030306: "Qt_3_3_5",
- 0x040000: "Qt_3_3_6"
+ 0x020000: "TQt_1_43",
+ 0x020100: "TQt_2_00",
+ 0x020200: "TQt_2_1_0",
+ 0x020300: "TQt_2_2_0",
+ 0x020301: "TQt_2_3_0",
+ 0x030000: "TQt_2_3_1",
+ 0x030001: "TQt_3_0_0",
+ 0x030002: "TQt_3_0_1",
+ 0x030004: "TQt_3_0_2",
+ 0x030005: "TQt_3_0_4",
+ 0x030006: "TQt_3_0_5",
+ 0x030100: "TQt_3_0_6",
+ 0x030101: "TQt_3_1_0",
+ 0x030102: "TQt_3_1_1",
+ 0x030200: "TQt_3_1_2",
+ 0x030300: "TQt_3_2_0",
+ 0x030305: "TQt_3_3_0",
+ 0x030306: "TQt_3_3_5",
+ 0x040000: "TQt_3_3_6"
}
def code(self, extra_include_dirs, extra_lib_dir, extra_libs):
@@ -271,7 +271,7 @@ class ConfigurePyQt3(ConfigureBase):
generate_code("qtpe", extra_libs=["qpe"], sip_flags=qtpe_sip_flags)
if "qtui" in pyqt_modules:
- generate_code("qtui", extra_libs=["qui"])
+ generate_code("qtui", extra_libs=["tqui"])
if "qtaxcontainer" in pyqt_modules:
generate_code("qtaxcontainer", extra_libs=["qaxcontainer"])
@@ -379,18 +379,18 @@ def inform_user():
else:
edstr = ""
- sipconfig.inform("Qt v%s %sis being used." % (sipconfig.version_to_string(qt_version), edstr))
+ sipconfig.inform("TQt v%s %sis being used." % (sipconfig.version_to_string(qt_version), edstr))
sipconfig.inform("SIP %s is being used." % sipcfg.sip_version_str)
- sipconfig.inform("These PyQt modules will be built: %s." % string.join(pyqt_modules))
+ sipconfig.inform("These PyTQt modules will be built: %s." % string.join(pyqt_modules))
if disabled_classes:
- sipconfig.inform("Support for these Qt classes has been disabled: %s." % string.join(disabled_classes))
+ sipconfig.inform("Support for these TQt classes has been disabled: %s." % string.join(disabled_classes))
- sipconfig.inform("The PyQt modules will be installed in %s." % opt_pyqtmoddir)
- sipconfig.inform("The PyQt .sip files will be installed in %s." % opt_pyqtsipdir)
+ sipconfig.inform("The PyTQt modules will be installed in %s." % opt_pyqtmoddir)
+ sipconfig.inform("The PyTQt .sip files will be installed in %s." % opt_pyqtsipdir)
- sipconfig.inform("The Qt header files are in %s." % qt_incdir)
- sipconfig.inform("The %s Qt library is in %s." % (opt_qtlib, qt_libdir))
+ sipconfig.inform("The TQt header files are in %s." % qt_incdir)
+ sipconfig.inform("The %s TQt library is in %s." % (opt_qtlib, qt_libdir))
if qt_version >= 0x020000:
sipconfig.inform("pyuic will be installed in %s." % opt_pyqtbindir)
@@ -399,11 +399,11 @@ def inform_user():
sipconfig.inform("pylupdate will be installed in %s." % opt_pyqtbindir)
if opt_vendorcheck:
- sipconfig.inform("PyQt will only be usable with signed interpreters.")
+ sipconfig.inform("PyTQt will only be usable with signed interpreters.")
def create_config(module, template, macros):
- """Create the PyQt configuration module so that it can be imported by build
+ """Create the PyTQt configuration module so that it can be imported by build
scripts.
module is the module file name.
@@ -471,7 +471,7 @@ def create_config(module, template, macros):
def compile_qt_program(name, define=None, include_dir=None, lib_dir=None, lib=None, opengl=0, python=0, debug=0):
- """Compile a simple Qt application.
+ """Compile a simple TQt application.
name is the name of the single source file.
define is a name to add to the list of preprocessor defines.
@@ -544,7 +544,7 @@ def compile_qt_program(name, define=None, include_dir=None, lib_dir=None, lib=No
def check_qscintilla():
- """See if QScintilla can be found and what its version is.
+ """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
@@ -555,26 +555,26 @@ def check_qscintilla():
if opt_qscilibdir is None:
opt_qscilibdir = qt_libdir
- # Find the QScintilla header files.
+ # Find the TQScintilla header files.
sciglobal = os.path.join(opt_qsciincdir, "qextscintillaglobal.h")
if os.access(sciglobal, os.F_OK):
- # Get the QScintilla version number.
+ # Get the TQScintilla version number.
global qsci_version
- qsci_version, sciversstr = sipconfig.read_version(sciglobal, "QScintilla", "QSCINTILLA_VERSION", "QSCINTILLA_VERSION_STR")
+ qsci_version, sciversstr = sipconfig.read_version(sciglobal, "TQScintilla", "TQSCINTILLA_VERSION", "TQSCINTILLA_VERSION_STR")
if glob.glob(os.path.join(opt_qscilibdir, "*qscintilla*")):
- sipconfig.inform("QScintilla %s is being used." % sciversstr)
+ sipconfig.inform("TQScintilla %s is being used." % sciversstr)
# If we find a snapshot then set a negative version number as a
# special case.
if string.find(sciversstr, "snapshot") >= 0:
qsci_version = -1
else:
- sipconfig.inform("The QScintilla library could not be found in %s and so the qtext module will not be built. If QScintilla is installed then use the -o argument to explicitly specify the correct directory." % opt_qscilibdir)
+ sipconfig.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)
else:
- sipconfig.inform("qextscintillaglobal.h could not be found in %s and so the qtext module will not be built. If QScintilla is installed then use the -n argument to explicitly specify the correct directory." % opt_qsciincdir)
+ sipconfig.inform("qextscintillaglobal.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)
def check_vendorid():
@@ -648,7 +648,7 @@ int main(int argc, char **argv)
def check_plugin(cname, incfile):
- """Return non-zero if a class that might be a plugin is in the main Qt
+ """Return non-zero if a class that might be a plugin is in the main TQt
library.
cname is the name of the class.
@@ -664,8 +664,8 @@ def create_features_file(name):
name is the name of the features file in the current directory.
"""
- # The features that a given Qt configuration may or may not support. Note
- # that STYLE_WINDOWSXP and ASSISTANTCLIENT require special handling.
+ # The features that a given TQt configuration may or may not support. Note
+ # that STYLE_WINDOWSXP and ASSISTANTCLIENT retquire special handling.
flist = ["ACTION", "CLIPBOARD", "CODECS", "COLORDIALOG", "DATASTREAM",
"DIAL", "DNS", "DOM", "DRAGANDDROP", "ICONVIEW", "IMAGE_TEXT",
"INPUTDIALOG", "FILEDIALOG", "FONTDATABASE", "FONTDIALOG",
@@ -691,7 +691,7 @@ def create_features_file(name):
int main(int argc,char **argv)
{
FILE *fp;
- QApplication app(argc,argv,0);
+ TQApplication app(argc,argv,0);
if ((fp = fopen("%s","w")) == NULL)
{
@@ -700,15 +700,15 @@ int main(int argc,char **argv)
}
#if !defined(WITH_THREAD) || !defined(QT_THREAD_SUPPORT)
- fprintf(fp,"-x Qt_THREAD_SUPPORT\\n");
+ fprintf(fp,"-x TQt_THREAD_SUPPORT\\n");
#endif
#if !defined(Q_WS_WIN) || QT_VERSION < 0x030000 || defined(QT_NO_STYLE_WINDOWSXP)
- fprintf(fp,"-x Qt_STYLE_WINDOWSXP\\n");
+ fprintf(fp,"-x TQt_STYLE_WINDOWSXP\\n");
#endif
#if defined(Q_OS_WIN64)
- fprintf(fp,"-x Qt_Q_LONG_IS_long\\n");
+ fprintf(fp,"-x TQt_Q_LONG_IS_long\\n");
#endif
""" % (name, name))
@@ -716,15 +716,15 @@ int main(int argc,char **argv)
f.write(
"""
#if defined(QT_NO_%s)
- fprintf(fp,"-x Qt_%s\\n");
+ fprintf(fp,"-x TQt_%s\\n");
#endif
""" % (feat, feat))
- # Disable QAssistantClient for the Professional Edition.
- if "QAssistantClient" in disabled_classes:
+ # Disable TQAssistantClient for the Professional Edition.
+ if "TQAssistantClient" in disabled_classes:
f.write(
"""
- fprintf(fp,"-x Qt_ASSISTANTCLIENT\\n");
+ fprintf(fp,"-x TQt_ASSISTANTCLIENT\\n");
""")
f.write(
@@ -749,27 +749,27 @@ int main(int argc,char **argv)
sipconfig.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", "QCDEStyle"),
- ("STYLE_INTERLACE", "qinterlacestyle.h", "QInterlaceStyle"),
- ("STYLE_MOTIF", "qmotifstyle.h", "QMotifStyle"),
- ("STYLE_MOTIFPLUS", "qmotifplusstyle.h", "QMotifPlusStyle"),
- ("STYLE_PLATINUM", "qplatinumstyle.h", "QPlatinumStyle"),
- ("STYLE_SGI", "qsgistyle.h", "QSGIStyle"),
- ("STYLE_WINDOWSXP", "qwindowsxpstyle.h", "QWindowsXPStyle"),
- ("STYLE_WINDOWS", "qwindowsstyle.h", "QWindowsStyle")]
+ 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")]
f = open(name, "a")
for (feat, incfile, cname) in plugins:
if not check_plugin(cname, incfile):
- f.write("-x Qt_%s\n" % feat)
+ f.write("-x TQt_%s\n" % feat)
disabled_classes.append(cname)
f.close()
def get_feature_flags():
- """Return the list of SIP flags that exclude unsupported Qt features.
+ """Return the list of SIP flags that exclude unsupported TQt features.
"""
featfile = "features"
@@ -791,7 +791,7 @@ def get_feature_flags():
line = ff.readline()
if sipcfg.sip_version >= 0x040702:
- flags.extend(['-x', 'Qt_SIP_PRE_4_7_2'])
+ flags.extend(['-x', 'TQt_SIP_PRE_4_7_2'])
return flags
@@ -823,8 +823,8 @@ def set_sip_flags():
qt_sip_flags.append("-t")
qt_sip_flags.append(plattag)
- # Handle the Qt version tag.
- verstag = sipconfig.version_to_sip_tag(qt_version, pyqt.qt_version_tags(), "Qt")
+ # Handle the TQt version tag.
+ verstag = sipconfig.version_to_sip_tag(qt_version, pyqt.qt_version_tags(), "TQt")
if verstag:
qt_sip_flags.append("-t")
@@ -835,26 +835,26 @@ def set_sip_flags():
qtext_sip_flags.append(f)
qtpe_sip_flags.append(f)
- # Handle the QScintilla version tag.
+ # Handle the TQScintilla version tag.
if qsci_version:
qscitags = {
0x010100: None,
- 0x010200: "QScintilla_1_1",
- 0x010300: "QScintilla_1_2",
- 0x010400: "QScintilla_1_3",
- 0x010500: "QScintilla_1_4",
- 0x010600: "QScintilla_1_5",
- 0x010700: "QScintilla_1_6",
- 0x020000: "QScintilla_1_7"
+ 0x010200: "TQScintilla_1_1",
+ 0x010300: "TQScintilla_1_2",
+ 0x010400: "TQScintilla_1_3",
+ 0x010500: "TQScintilla_1_4",
+ 0x010600: "TQScintilla_1_5",
+ 0x010700: "TQScintilla_1_6",
+ 0x020000: "TQScintilla_1_7"
}
- verstag = sipconfig.version_to_sip_tag(qsci_version, qscitags, "QScintilla")
+ verstag = sipconfig.version_to_sip_tag(qsci_version, qscitags, "TQScintilla")
if verstag:
qtext_sip_flags.append("-t")
qtext_sip_flags.append(verstag)
- # Handle the Qtopia tag.
+ # Handle the TQtopia tag.
if opt_qtpetag:
qtpe_sip_flags.append("-t")
qtpe_sip_flags.append(opt_qtpetag)
@@ -972,7 +972,7 @@ def generate_code(mname, extra_cflags=None, extra_cxxflags=None, extra_define=No
def check_license():
- """Handle the validation of the PyQt license.
+ """Handle the validation of the PyTQt license.
"""
try:
import license
@@ -991,11 +991,11 @@ def check_license():
lname = "GNU General Public License"
lfile = None
- sipconfig.inform("This is the %s version of PyQt %s (licensed under the %s) for Python %s on %s." % (ltype, pyqt_version_str, lname, string.split(sys.version)[0], sys.platform))
+ sipconfig.inform("This is the %s version of PyTQt %s (licensed under the %s) for Python %s on %s." % (ltype, pyqt_version_str, lname, string.split(sys.version)[0], sys.platform))
# Common checks.
if ltype == "GPL" and sys.platform == "win32":
- error("You cannot use the GPL version of PyQt under Windows.")
+ error("You cannot use the GPL version of PyTQt under Windows.")
try:
qted = qt_edition
@@ -1004,7 +1004,7 @@ def check_license():
if qted and ltype != "internal":
if (qted == "free" and ltype != "GPL") or (qted != "free" and ltype == "GPL"):
- sipconfig.error("This version of PyQt and the %s edition of Qt have incompatible licenses." % qted)
+ sipconfig.error("This version of PyTQt and the %s edition of TQt have incompatible licenses." % qted)
# Confirm the license.
sys.stdout.write("""
@@ -1040,7 +1040,7 @@ Type 'no' to decline the terms of the license.
def get_build_macros(overrides):
- """Return the dictionary of platform specific build macros from the Qt
+ """Return the dictionary of platform specific build macros from the TQt
installation. Return None if any of the overrides was invalid.
overrides is a list of macros overrides from the user.
@@ -1054,7 +1054,7 @@ def get_build_macros(overrides):
if not os.access(fname, os.F_OK):
sipconfig.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)
- # Add the Qt specific macros to the default.
+ # Add the TQt specific macros to the default.
names = sipcfg.build_macros().keys()
names.append("INCDIR_QT")
names.append("LIBDIR_QT")
@@ -1073,14 +1073,14 @@ def get_build_macros(overrides):
def check_qt_installation(macros):
- """Check the Qt installation and get the version number and edition.
+ """Check the TQt installation and get the version number and edition.
macros is the dictionary of build macros.
"""
# Get the Makefile generator.
generator = macros["MAKEFILE_GENERATOR"]
- # Set the Qt include and lib directories.
+ # Set the TQt include and lib directories.
global qt_incdir, qt_libdir
qt_incdir = macros["INCDIR_QT"]
@@ -1095,8 +1095,8 @@ def check_qt_installation(macros):
qt_libdir = os.path.join(qt_dir, "lib")
macros["LIBDIR_QT"] = qt_libdir
- # Check the Qt header files have been installed. Quietly check for Qt v4.
- qt4_d = os.path.join(qt_incdir, "QtCore")
+ # Check the TQt header files have been installed. Quietly check for TQt v4.
+ qt4_d = os.path.join(qt_incdir, "TQtCore")
qglobal = os.path.join(qt4_d, "qglobal.h")
@@ -1106,24 +1106,24 @@ def check_qt_installation(macros):
if not os.access(qglobal, os.F_OK):
sipconfig.error("qglobal.h could not be found in %s." % qt_incdir)
- # Get the Qt version number.
+ # Get the TQt version number.
global qt_version
- qt_version, ignore = sipconfig.read_version(qglobal, "Qt", "QT_VERSION")
+ qt_version, ignore = sipconfig.read_version(qglobal, "TQt", "QT_VERSION")
- # Early versions of Qt for the Mac didn't include everything. Rather than
+ # 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:
- sipconfig.error("PyQt for MacOS/X requires Qt v3.1.0 or later.")
+ sipconfig.error("PyTQt for MacOS/X retquires TQt v3.1.0 or later.")
# The way SIP v4.2 and later handle connections between signals and Python
- # slots only works with Qt v3 and later. Therefore Qt v2 and earlier needs
+ # slots only works with TQt v3 and later. Therefore TQt v2 and earlier needs
# SIP v3.
if qt_version < 0x030000:
- sipconfig.error("Qt v2.x and earlier require SIP v3.x.")
+ sipconfig.error("TQt v2.x and earlier retquire SIP v3.x.")
if qt_version >= 0x040000:
- sipconfig.error("Qt v4.x requires PyQt v4.x.")
+ sipconfig.error("TQt v4.x retquires PyTQt v4.x.")
# Try and work out which edition it is.
global qt_edition
@@ -1153,14 +1153,14 @@ def check_qt_installation(macros):
f.close()
if not qt_edition:
- sipconfig.error("The Qt edition could not be determined by parsing %s." % qconfig)
+ sipconfig.error("The TQt edition could not be determined by parsing %s." % qconfig)
elif qt_version == 0x020300 and sys.platform == "win32":
- # See if we have the Qt v2 non-commercial version.
+ # 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 sys.platform == "win32":
- # Work out how Qt was built on Windows.
+ # Work out how TQt was built on Windows.
global qt_winconfig
@@ -1181,19 +1181,19 @@ def check_qt_installation(macros):
# Assume it was built as a DLL.
qt_winconfig = "shared"
- # Determine the Qt library to link against and if it has thread support.
+ # Determine the TQt library to link against and if it has thread support.
global qt_threaded
resolve_qt3_library(generator)
- if opt_qtlib in ("qt-mt", "qt-mtedu", "qt-mteval", "qte-mt", "qtmt", "qtmtedu", "qtmteval"):
+ if opt_qtlib 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
global pyqt
- pyqt = ConfigurePyQt3()
+ pyqt = ConfigurePyTQt3()
- # We haven't yet factored out sipconfig's knowledge of how to build Qt
+ # We haven't yet factored out sipconfig'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
@@ -1207,7 +1207,7 @@ def check_qt_installation(macros):
def resolve_qt3_library(generator):
- """See which version of the Qt v3 library can be found. (We can't trust
+ """See which version of the TQt v3 library can be found. (We can't trust
the configuration files.)
generator is the name of the Makefile generator.
@@ -1216,67 +1216,67 @@ def resolve_qt3_library(generator):
if opt_qtlib:
if not is_qt_library(generator, opt_qtlib):
- sipconfig.error("The %s Qt library could not be found in %s." % (opt_qtlib, qt_libdir))
+ sipconfig.error("The %s TQt library could not be found in %s." % (opt_qtlib, qt_libdir))
else:
- stlib = is_qt_library(generator, "qt")
- mtlib = is_qt_library(generator, "qt-mt")
- edlib = is_qt_library(generator, "qt-mtedu")
- evlib = is_qt_library(generator, "qt-mteval")
- emlib = is_qt_library(generator, "qte")
- etlib = is_qt_library(generator, "qte-mt")
+ 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")
# Borland likes to be a little different.
- bmtlib = is_qt_library(generator, "qtmt")
- bedlib = is_qt_library(generator, "qtmtedu")
- bevlib = is_qt_library(generator, "qtmteval")
+ bmtlib = is_qt_library(generator, "tqtmt")
+ bedlib = is_qt_library(generator, "tqtmtedu")
+ bevlib = is_qt_library(generator, "tqtmteval")
names = []
if stlib:
- opt_qtlib = "qt"
+ opt_qtlib = "tqt"
names.append(opt_qtlib)
if mtlib:
- opt_qtlib = "qt-mt"
+ opt_qtlib = "tqt-mt"
names.append(opt_qtlib)
if edlib:
- opt_qtlib = "qt-mtedu"
+ opt_qtlib = "tqt-mtedu"
names.append(opt_qtlib)
if evlib:
- opt_qtlib = "qt-mteval"
+ opt_qtlib = "tqt-mteval"
names.append(opt_qtlib)
if emlib:
- opt_qtlib = "qte"
+ opt_qtlib = "tqte"
names.append(opt_qtlib)
if etlib:
- opt_qtlib = "qte-mt"
+ opt_qtlib = "tqte-mt"
names.append(opt_qtlib)
if bmtlib:
- opt_qtlib = "qtmt"
+ opt_qtlib = "tqtmt"
names.append(opt_qtlib)
if bedlib:
- opt_qtlib = "qtmtedu"
+ opt_qtlib = "tqtmtedu"
names.append(opt_qtlib)
if bevlib:
- opt_qtlib = "qtmteval"
+ opt_qtlib = "tqtmteval"
names.append(opt_qtlib)
if not names:
- sipconfig.error("No Qt libraries could be found in %s." % qt_libdir)
+ sipconfig.error("No TQt libraries could be found in %s." % qt_libdir)
if len(names) > 1:
- sipconfig.error("These Qt libraries were found: %s. Use the -y argument to explicitly specify which you want to use." % string.join(names))
+ sipconfig.error("These TQt libraries were found: %s. Use the -y argument to explicitly specify which you want to use." % string.join(names))
def is_qt_library(generator, lib):
- """See if a particular Qt library is installed.
+ """See if a particular TQt library is installed.
generator is the name of the Makefile generator.
lib is the name of the library.
@@ -1302,12 +1302,12 @@ def main(argv):
"""
# Check Python isn't too new.
if sipcfg.py_version >= 0x030000:
- sipconfig.error("PyQt v3.x does not support Python v3.x")
+ sipconfig.error("PyTQt v3.x does not support Python v3.x")
# Check SIP is new enough.
if sipcfg.sip_version_str[:8] != "snapshot":
if sipcfg.sip_version < sip_min_version:
- sipconfig.error("This version of PyQt requires SIP v%s or later" % sipconfig.version_to_string(sip_min_version))
+ sipconfig.error("This version of PyTQt retquires SIP v%s or later" % sipconfig.version_to_string(sip_min_version))
# Parse the command line.
try:
@@ -1367,21 +1367,21 @@ def main(argv):
elif opt == "-w":
opt_verbose = 1
elif opt == "-y":
- if arg in ("qt", "qt-mt", "qt-mtedu", "qt-mteval", "qte", "qte-mt", "qtmt", "qtmtedu"):
+ 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"):
opt_qtlib = arg
else:
usage()
- # Check that we know the name of the Qt root directory.
+ # Check that we know the name of the TQt root directory.
if not qt_dir:
- sipconfig.error("A Qt installation could not be found. Use use the -q argument or the QTDIR environment variable to explicitly specify the correct directory.")
+ sipconfig.error("A TQt installation could not be found. Use use the -q argument or the QTDIR environment variable to explicitly specify the correct directory.")
# When building static libraries, signed interpreter checking makes no
# sense.
if opt_vendorcheck and opt_static:
sipconfig.error("Using the VendorID package when building static libraries makes no sense.")
- # Replace the existing build macros with the ones from the Qt installation.
+ # Replace the existing build macros with the ones from the TQt installation.
macros = get_build_macros(args)
if macros is None:
@@ -1389,13 +1389,13 @@ def main(argv):
sipcfg.set_build_macros(macros)
- # Check Qt is what we need.
+ # Check TQt is what we need.
check_qt_installation(macros)
# Check the licenses are compatible.
check_license()
- # Check for QScintilla.
+ # Check for TQScintilla.
check_qscintilla()
# Check which modules to build.