diff options
Diffstat (limited to 'siputils.py')
-rw-r--r-- | siputils.py | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/siputils.py b/siputils.py index 6abc6b1..e73e2f2 100644 --- a/siputils.py +++ b/siputils.py @@ -199,7 +199,7 @@ class _Macro: class Makefile: """The base class for the different types of Makefiles. """ - def __init__(self, configuration, console=0, qt=0, opengl=0, python=0, + def __init__(self, configuration, console=0, tqt=0, opengl=0, python=0, threaded=0, warnings=1, debug=0, dir=None, makefile="Makefile", installs=None, universal=None, arch=None): @@ -208,13 +208,13 @@ class Makefile: configuration is the current configuration. console is set if the target is a console (rather than windows) target. - qt is set if the target uses Qt. For Qt v4 a list of Qt libraries may + tqt is set if the target uses TQt. For Qt v4 a list of Qt libraries may be specified and a simple non-zero value implies QtCore and QtGui. opengl is set if the target uses OpenGL. python is set if the target #includes Python.h. debug is set to generated a debugging version of the target. threaded is set if the target requires thread support. It is - automatically set if the target uses Qt and Qt has thread support + automatically set if the target uses TQt and TQt has thread support enabled. warnings is set if compiler warning messages are required. debug is set if debugging symbols should be generated. @@ -229,17 +229,17 @@ class Makefile: arch is the space separated MacOS/X architectures to build. If it is None then it is taken from the configuration. """ - if qt: - if not hasattr(configuration, "qt_version"): - error("The target uses Qt but pyqtconfig has not been imported.") + if tqt: + if not hasattr(configuration, "tqt_version"): + error("The target uses TQt but pytqtconfig has not been imported.") - self._threaded = configuration.qt_threaded + self._threaded = configuration.tqt_threaded else: self._threaded = threaded self.config = configuration self.console = console - self._qt = qt + self._tqt = tqt self._opengl = opengl self._python = python self._warnings = warnings @@ -326,14 +326,14 @@ class Makefile: """Finalise the macros by doing any consolidation that isn't specific to a Makefile. """ - # Extract the things we might need from the Windows Qt configuration. - # Note that we used to think that if Qt was built with exceptions, RTTI + # Extract the things we might need from the Windows TQt configuration. + # Note that we used to think that if TQt was built with exceptions, RTTI # and STL support enabled then anything that linked against it also # needed the same flags. However, detecting this was broken for some # time and nobody complained. For the moment we'll leave the code in # but it will never be used. - if self._qt: - wcfg = self.config.qt_winconfig.split() + if self._tqt: + wcfg = self.config.tqt_winconfig.split() win_shared = ("shared" in wcfg) win_exceptions = ("exceptions" in wcfg) win_rtti = ("rtti" in wcfg) @@ -394,7 +394,7 @@ class Makefile: for l in self.extra_libs: libs.append(self.platform_lib(l)) - if self._qt: + if self._tqt: libs.extend(self._dependent_libs(l)) libs.extend(self.optional_list("LIBS")) @@ -522,9 +522,9 @@ class Makefile: cxxflags.extend(self.optional_list("CXXFLAGS_THREAD")) lflags.extend(self.optional_list("LFLAGS_THREAD")) - if self._qt: + if self._tqt: if self.generator != "UNIX" and win_shared: - defines.append("QT_DLL") + defines.append("TQT_DLL") if not self._debug: defines.append("TQT_NO_DEBUG") @@ -533,27 +533,27 @@ class Makefile: defines.append("TQT_THREAD_SUPPORT") # Handle library directories. - libdir_qt = self.optional_list("LIBDIR_TQT") - libdir.extend(libdir_qt) - rpaths.extend(libdir_qt) + libdir_tqt = self.optional_list("LIBDIR_TQT") + libdir.extend(libdir_tqt) + rpaths.extend(libdir_tqt) - # Windows needs the version number appended if Qt is a DLL. - qt_lib = self.config.qt_lib + # Windows needs the version number appended if TQt is a DLL. + tqt_lib = self.config.tqt_lib if self.generator in ("MSVC", "MSVC.NET", "BMAKE") and win_shared: - qt_lib = qt_lib + version_to_string(self.config.qt_version).replace(".", "") + tqt_lib = tqt_lib + version_to_string(self.config.tqt_version).replace(".", "") - if self.config.qt_edition == "non-commercial": - qt_lib = qt_lib + "nc" + if self.config.tqt_edition == "non-commercial": + tqt_lib = tqt_lib + "nc" - libs.append(self.platform_lib(qt_lib)) - libs.extend(self._dependent_libs(self.config.qt_lib)) + libs.append(self.platform_lib(tqt_lib)) + libs.extend(self._dependent_libs(self.config.tqt_lib)) # Handle header directories. try: - specd_base = self.config.qt_data_dir + specd_base = self.config.tqt_data_dir except AttributeError: - specd_base = self.config.qt_dir + specd_base = self.config.tqt_dir specd = os.path.join(specd_base, "mkspecs", "default") @@ -562,11 +562,11 @@ class Makefile: incdir.append(specd) - qtincdir = self.optional_list("INCDIR_TQT") + tqtincdir = self.optional_list("INCDIR_TQT") - if qtincdir: + if tqtincdir: # This must go after the module include directories. - incdir.extend(qtincdir) + incdir.extend(tqtincdir) if self._opengl: incdir.extend(self.optional_list("INCDIR_OPENGL")) @@ -574,7 +574,7 @@ class Makefile: libdir.extend(self.optional_list("LIBDIR_OPENGL")) libs.extend(self.optional_list("LIBS_OPENGL")) - if self._qt or self._opengl: + if self._tqt or self._opengl: incdir.extend(self.optional_list("INCDIR_X11")) libdir.extend(self.optional_list("LIBDIR_X11")) libs.extend(self.optional_list("LIBS_X11")) @@ -680,9 +680,9 @@ class Makefile: prl_libs = [] if self.generator in ("MSVC", "MSVC.NET", "BMAKE"): - prl_name = os.path.join(self.config.qt_lib_dir, clib + ".prl") + prl_name = os.path.join(self.config.tqt_lib_dir, clib + ".prl") else: - prl_name = os.path.join(self.config.qt_lib_dir, "lib" + clib + ".prl") + prl_name = os.path.join(self.config.tqt_lib_dir, "lib" + clib + ".prl") if os.access(prl_name, os.F_OK): try: @@ -777,7 +777,7 @@ class Makefile: olist.append(root + ext) for f in bdict["tqmoc_headers"].split(): - if not self._qt: + if not self._tqt: error("\"%s\" defines \"tqmoc_headers\" for a non-Qt module." % bfname) root, discard = os.path.splitext(f) @@ -893,7 +893,7 @@ class Makefile: mfile.write("LIBS = %s\n" % ' '.join(libs)) - if self._qt: + if self._tqt: mfile.write("MOC = %s\n" % _quote(self.required_string("MOC"))) if self._src_dir != self.dir: @@ -1163,7 +1163,7 @@ class ModuleMakefile(Makefile): """The class that represents a Python extension module Makefile """ def __init__(self, configuration, build_file, install_dir=None, static=0, - console=0, qt=0, opengl=0, threaded=0, warnings=1, debug=0, + console=0, tqt=0, opengl=0, threaded=0, warnings=1, debug=0, dir=None, makefile="Makefile", installs=None, strip=1, export_all=0, universal=None, arch=None): """Initialise an instance of a module Makefile. @@ -1179,7 +1179,7 @@ class ModuleMakefile(Makefile): increases the size of the module and slows down module load times but may avoid problems with modules that use exceptions. The default is 0. """ - Makefile.__init__(self, configuration, console, qt, opengl, 1, threaded, warnings, debug, dir, makefile, installs, universal, arch) + Makefile.__init__(self, configuration, console, tqt, opengl, 1, threaded, warnings, debug, dir, makefile, installs, universal, arch) self._build = self.parse_build_file(build_file) self._install_dir = install_dir @@ -1479,7 +1479,7 @@ class SIPModuleMakefile(ModuleMakefile): """The class that represents a SIP-TQt generated module Makefile. """ def __init__(self, configuration, build_file, install_dir=None, static=0, - console=0, qt=0, opengl=0, threaded=0, warnings=1, debug=0, + console=0, tqt=0, opengl=0, threaded=0, warnings=1, debug=0, dir=None, makefile="Makefile", installs=None, strip=1, export_all=0, universal=None, arch=None, prot_is_public=0): """Initialise an instance of a SIP-TQt generated module Makefile. @@ -1491,7 +1491,7 @@ class SIPModuleMakefile(ModuleMakefile): For all other arguments see ModuleMakefile. """ ModuleMakefile.__init__(self, configuration, build_file, install_dir, - static, console, qt, opengl, threaded, warnings, debug, dir, + static, console, tqt, opengl, threaded, warnings, debug, dir, makefile, installs, strip, export_all, universal, arch) self._prot_is_public = prot_is_public @@ -1512,7 +1512,7 @@ class ProgramMakefile(Makefile): """The class that represents a program Makefile. """ def __init__(self, configuration, build_file=None, install_dir=None, - console=0, qt=0, opengl=0, python=0, threaded=0, warnings=1, + console=0, tqt=0, opengl=0, python=0, threaded=0, warnings=1, debug=0, dir=None, makefile="Makefile", installs=None, universal=None, arch=None): """Initialise an instance of a program Makefile. @@ -1521,7 +1521,7 @@ class ProgramMakefile(Makefile): it is a dictionary instead then its contents are validated. install_dir is the directory the target will be installed in. """ - Makefile.__init__(self, configuration, console, qt, opengl, python, threaded, warnings, debug, dir, makefile, installs, universal, arch) + Makefile.__init__(self, configuration, console, tqt, opengl, python, threaded, warnings, debug, dir, makefile, installs, universal, arch) self._install_dir = install_dir |