summaryrefslogtreecommitdiffstats
path: root/build.py
diff options
context:
space:
mode:
authoraneejit1 <[email protected]>2022-04-19 13:21:52 +0000
committerSlávek Banko <[email protected]>2022-07-27 18:08:53 +0200
commit6be046642290c28c17949022fb66ae02ac21d544 (patch)
treee7b38b35a42b27569b26736afc4e472a2a5d672d /build.py
parent63fe0b82b47e7ee31f91374d96022a3ae77a86c3 (diff)
downloadpytqt-6be046642290c28c17949022fb66ae02ac21d544.tar.gz
pytqt-6be046642290c28c17949022fb66ae02ac21d544.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 <[email protected]> Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'build.py')
-rw-r--r--build.py39
1 files changed, 19 insertions, 20 deletions
diff --git a/build.py b/build.py
index fa63bfc..890acad 100644
--- a/build.py
+++ b/build.py
@@ -37,8 +37,8 @@ import string
try:
import sip_tqt_config
except:
- print "Unable to import the sip_tqt_config module. Please make sure you have"
- print "SIP-TQt v3.9 or later installed."
+ print("Unable to import the sip_tqt_config module. Please make sure you have")
+ print("SIP-TQt v3.9 or later installed.")
sys.exit(1)
config = sip_tqt_config.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]" % sip_tqt_config.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-TQt 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]" % sip_tqt_config.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-TQt 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 [email protected].
-"""
+""")
raise