diff --git a/easybuild/easyconfigs/p/PyQt5/PyQt5-5.15.7-GCCcore-12.2.0.eb b/easybuild/easyconfigs/p/PyQt5/PyQt5-5.15.7-GCCcore-12.2.0.eb new file mode 100644 index 00000000000..0987fcacdf5 --- /dev/null +++ b/easybuild/easyconfigs/p/PyQt5/PyQt5-5.15.7-GCCcore-12.2.0.eb @@ -0,0 +1,119 @@ +easyblock = 'Bundle' + +name = 'PyQt5' +version = '5.15.7' + +homepage = 'https://www.riverbankcomputing.com/software/pyqt' +description = """PyQt5 is a set of Python bindings for v5 of the Qt application framework from The Qt Company. +This bundle includes PyQtWebEngine, a set of Python bindings for The Qt Company’s Qt WebEngine framework.""" + +toolchain = {'name': 'GCCcore', 'version': '12.2.0'} +toolchainopts = {'cstd': 'c++11'} + +builddependencies = [ + ('binutils', '2.39'), + ('flex', '2.6.4'), # req. for PyQt5-5.15.7_sip-5.5.0_add_py_ssize_t_clean.patch + ('Bison', '3.8.2'), # req. for PyQt5-5.15.7_sip-5.5.0_add_py_ssize_t_clean.patch +] +dependencies = [ + ('Python', '3.10.8'), + ('Qt5', '5.15.7'), +] + +default_easyblock = 'PythonPackage' + +local_sipdir = '%(installdir)s/share/sip' + +local_pylibdir = '%(installdir)s/lib/python%(pyshortver)s/site-packages' + +local_pyqt5_sip_install = "sip-install --verbose --target-dir " + local_pylibdir + " " +local_pyqt5_sip_install += "--confirm-license --no-designer-plugin --no-qml-plugin " + +local_pyqtweb_configopts = "configure.py --verbose --destdir=%s/PyQt5 " % local_pylibdir +local_pyqtweb_configopts += "--apidir=%(installdir)s/qsci " +local_pyqtweb_configopts += "--pyqt-sipdir=%s " % local_sipdir +local_pyqtweb_configopts += "--sipdir=%s " % local_sipdir +local_pyqtweb_configopts += "--no-stubs --no-dist-info" + +local_pyqt_configopts = "configure.py --verbose --destdir=%s " % local_pylibdir +local_pyqt_configopts += "--no-stubs " +local_pyqt_configopts += "--confirm-license --no-designer-plugin --no-qml-plugin " +# prevent installing pyrcc5 and other tools into $EBROOTPYTHON/bin: +local_pyqt_configopts += "--bindir=%(installdir)s/bin " +local_pyqt_configopts += "--sipdir=%s " % local_sipdir + +local_setup_env = "export PATH=%(installdir)s/bin:$PATH && " +local_setup_env += "export PYTHONPATH=%(installdir)s/lib/python%(pyshortver)s/site-packages:$PYTHONPATH && " +local_sipver = '5.5.0' +local_sip_rebuildparser = 'flex -o code_generator/lexer.c code_generator/metasrc/lexer.l &&' +local_sip_rebuildparser += 'bison -y -d -o code_generator/parser.c code_generator/metasrc/parser.y &&' +components = [ + ('SIP', local_sipver, { + 'source_urls': [PYPI_SOURCE], + 'sources': [SOURCELOWER_TAR_GZ], + 'start_dir': 'sip-%s' % local_sipver, + 'use_pip': True, + 'options': {'modulename': 'PyQt5.sip'}, + 'patches': ['PyQt5-5.15.7_sip-5.5.0_add_py_ssize_t_clean.patch'], + 'preinstallopts': local_sip_rebuildparser, # req. for PyQt5-5.15.7_sip-5.5.0_add_py_ssize_t_clean.patch + 'checksums': [ + '5d024c419b30fea8a6de8c71a560c7ab0bc3c221fbfb14d55a5b865bd58eaac5', + 'f828b1cf81e8bfea676f7aa1e428102aade5acf520aedd85e7de08b0b2226a5d' + ], + }), + ('PyQt-builder', '1.11.0', { + 'source_urls': [PYPI_SOURCE], + 'sources': [SOURCE_TAR_GZ], + 'start_dir': 'PyQt-builder-%(version)s', + 'use_pip': True, + 'checksums': ['40f6df88c00e6aa9ac9a8bc5688f9fe2a4bd56c06cdb0a0b00ce8955ec34ffe5'], + }), + ('PyQt5_sip', '12.11.0', { + 'source_urls': [PYPI_SOURCE], + 'sources': [SOURCE_TAR_GZ], + 'start_dir': 'PyQt5_sip-%(version)s', + 'use_pip': True, + 'checksums': ['b4710fd85b57edef716cc55fae45bfd5bfac6fc7ba91036f1dcc3f331ca0eb39'], + }), + (name, version, { + 'source_urls': [PYPI_SOURCE], + 'sources': [SOURCE_TAR_GZ], + 'easyblock': 'ConfigureMakePythonPackage', + 'start_dir': '%(name)s-%(version)s', + 'preconfigopts': local_setup_env, + 'configopts': local_pyqt_configopts, + 'checksums': ['755121a52b3a08cb07275c10ebb96576d36e320e572591db16cfdbc558101594'], + }), + ('PyQtWebEngine', '5.15.6', { + 'source_urls': [PYPI_SOURCE], + 'sources': [SOURCE_TAR_GZ], + 'easyblock': 'ConfigureMakePythonPackage', + 'start_dir': '%(name)s-%(version)s', + 'preconfigopts': local_setup_env, + 'configopts': local_pyqtweb_configopts, + 'options': {'modulename': 'PyQt5.QtWebEngine'}, + 'checksums': ['ae241ef2a61c782939c58b52c2aea53ad99b30f3934c8358d5e0a6ebb3fd0721'], + }), +] + +sanity_check_paths = { + 'files': ['bin/%s' % x for x in [ + 'pyrcc5', 'pyuic5', 'pylupdate5', 'pyqt-bundle', 'sip-build', 'sip-install', 'sip5']], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +sanity_check_commands = [ + "python -c 'import PyQt5.QtCore'", + "sip5 --help", + "pyuic5 --help", + "pylupdate5 -version 2>&1 | grep 'pylupdate5 v%(version)s'", + "pyrcc5 -version 2>&1 | grep 'pyrcc5 v%(version)s'", + "pip check", +] + +modextrapaths = { + 'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages', + 'QT_INSTALL_DATA': 'qsci', +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/p/PyQt5/PyQt5-5.15.7_sip-5.5.0_add_py_ssize_t_clean.patch b/easybuild/easyconfigs/p/PyQt5/PyQt5-5.15.7_sip-5.5.0_add_py_ssize_t_clean.patch new file mode 100644 index 00000000000..4f5fa9f06ba --- /dev/null +++ b/easybuild/easyconfigs/p/PyQt5/PyQt5-5.15.7_sip-5.5.0_add_py_ssize_t_clean.patch @@ -0,0 +1,44 @@ +# Thomas Hoffmann, EMBL Heidelberg, structures-it@embl.de, 2023/11 +# add py_ssize_t_clean to the sip4 parser +# acc to https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1828544.html +diff -ru sip-5.5.0/code_generator/metasrc/lexer.l sip-5.5.0_add_py_ssize_t_clean/code_generator/metasrc/lexer.l +--- sip-5.5.0/code_generator/metasrc/lexer.l 2020-11-23 14:21:33.000000000 +0100 ++++ sip-5.5.0_add_py_ssize_t_clean/code_generator/metasrc/lexer.l 2023-11-20 12:30:35.030063970 +0100 +@@ -167,6 +167,7 @@ + timestamp {return TK_TIMESTAMP;} + type {return TK_TYPE;} + use_argument_names {return TK_USEARGNAMES;} ++py_ssize_t_clean {return TK_PYSSIZETCLEAN;} + use_limited_api {return TK_USELIMITEDAPI;} + all_raise_py_exception {return TK_ALLRAISEPYEXC;} + call_super_init {return TK_CALLSUPERINIT;} +diff -ru sip-5.5.0/code_generator/metasrc/parser.y sip-5.5.0_add_py_ssize_t_clean/code_generator/metasrc/parser.y +--- sip-5.5.0/code_generator/metasrc/parser.y 2020-11-23 14:21:33.000000000 +0100 ++++ sip-5.5.0_add_py_ssize_t_clean/code_generator/metasrc/parser.y 2023-11-20 12:30:35.030063970 +0100 +@@ -373,6 +373,7 @@ + %token TK_TIMESTAMP + %token TK_TYPE + %token TK_USEARGNAMES ++%token TK_PYSSIZETCLEAN + %token TK_USELIMITEDAPI + %token TK_ALLRAISEPYEXC + %token TK_CALLSUPERINIT +@@ -1843,6 +1844,18 @@ + $$.use_limited_api = FALSE; + $$.all_raise_py_exc = FALSE; + $$.call_super_init = -1; ++ $$.def_error_handler = NULL; ++ } ++ | TK_PYSSIZETCLEAN '=' bool_value { ++ $$.token = TK_PYSSIZETCLEAN; ++ ++ $$.c_module = FALSE; ++ $$.kwargs = defaultKwArgs; ++ $$.name = NULL; ++ $$.use_arg_names = FALSE; ++ $$.use_limited_api = FALSE; ++ $$.all_raise_py_exc = FALSE; ++ $$.call_super_init = -1; + $$.def_error_handler = NULL; + } + | TK_USELIMITEDAPI '=' bool_value {