diff options
| author | aneejit1 <aneejit1@gmail.com> | 2022-04-19 13:21:52 +0000 |
|---|---|---|
| committer | Slávek Banko <slavek.banko@axis.cz> | 2022-07-28 00:56:02 +0200 |
| commit | 52f8f8436dc2af136156ef95dbb8463481a78df8 (patch) | |
| tree | 50e5f757a67774f98bfa931ef191dcc07683996d /build.py | |
| parent | 228b87ea89625d0783fdfe60114eba89e0f37942 (diff) | |
| download | pytqt-52f8f8436dc2af136156ef95dbb8463481a78df8.tar.gz pytqt-52f8f8436dc2af136156ef95dbb8463481a78df8.zip | |
Updates to support Python version 3
Amendments to the sip source and configuration/build scripts to allow
for support under Python version 3. The examples have been updated
using "2to3" along with some manual changes to sort out intentation
and casting to integer from float.
Signed-off-by: aneejit1 <aneejit1@gmail.com>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 6be046642290c28c17949022fb66ae02ac21d544)
Diffstat (limited to 'build.py')
| -rw-r--r-- | build.py | 39 |
1 files changed, 19 insertions, 20 deletions
@@ -37,8 +37,8 @@ import string try: from sip4_tqt import sipconfig except: - print "Unable to import the sipconfig module. Please make sure you have" - print "SIP v3.9 or later installed." + print("Unable to import the sipconfig module. Please make sure you have") + print("SIP v3.9 or later installed.") sys.exit(1) config = sipconfig.SIPConfig("PyTQt 3.18.1") @@ -67,20 +67,20 @@ def usage(rcode = 2): rcode is the return code passed back to the calling process. """ - print "Usage:" - print " %s [-h] [-a version] [-b dir] [-c] [-d dir] [-g] [-j #] [-n dir] [-o dir] [-r] [-v dir]" % sipconfig.script() - print "where:" - print " -h display this help message" - print " -a tag explicitly enable the qtpe module" - print " -b dir where pyuic and pylupdate will be installed [default %s]" % config.default_bin_dir - print " -c concatenate each module's C++ source files" - print " -d dir where the PyTQt modules will be installed [default %s]" % config.default_mod_dir - print " -g always release the GIL (SIP v3.x behaviour)" - print " -j # split the concatenated C++ source files into # pieces [default 1]" - print " -n dir the directory containing the TQScintilla header files [default %s]" % config.qt_inc_dir - print " -o dir the directory containing the TQScintilla library [default %s]" % config.qt_lib_dir - print " -r generate code with tracing enabled [default disabled]" - print " -v dir where the PyTQt .sip files will be installed [default %s]" % config.default_sip_dir + print("Usage:") + print(" %s [-h] [-a version] [-b dir] [-c] [-d dir] [-g] [-j #] [-n dir] [-o dir] [-r] [-v dir]" % sipconfig.script()) + print("where:") + print(" -h display this help message") + print(" -a tag explicitly enable the qtpe module") + print(" -b dir where pyuic and pylupdate will be installed [default %s]" % config.default_bin_dir) + print(" -c concatenate each module's C++ source files") + print(" -d dir where the PyTQt modules will be installed [default %s]" % config.default_mod_dir) + print(" -g always release the GIL (SIP v3.x behaviour)") + print(" -j # split the concatenated C++ source files into # pieces [default 1]") + print(" -n dir the directory containing the TQScintilla header files [default %s]" % config.qt_inc_dir) + print(" -o dir the directory containing the TQScintilla library [default %s]" % config.qt_lib_dir) + print(" -r generate code with tracing enabled [default disabled]") + print(" -v dir where the PyTQt .sip files will be installed [default %s]" % config.default_sip_dir) sys.exit(rcode) @@ -439,7 +439,7 @@ def versionToTag(vers, tags, desc): """ tag = None - vl = tags.keys() + vl = list(tags.keys()) vl.sort() # For a snapshot use the latest tag. @@ -723,8 +723,7 @@ if __name__ == "__main__": except SystemExit: raise except: - print \ -"""An internal error occured. Please report all the output from the program, + print("""An internal error occured. Please report all the output from the program, including the following traceback, to support@riverbankcomputing.co.uk. -""" +""") raise |
