Created attachment 190443 [details] PyQt5: Fix plist under python 3.4 Summary ======= The PyQt5 ports cannot be built successfully when using python 3.4. Poudriere terminates in the package phase with the following error (or similar). =======================<phase: package >============================ ===> Building package for py34-qt5-core-5.9.2_1 pkg-static: Unable to access file /wrkdirs/usr/ports/devel/py-qt5-core/work-py34/stage/usr/local/lib/python3.4/site-packages/PyQt5/QtCore.pyi:No such file or directory *** Error code 1 Stop. make: stopped in /usr/ports/devel/py-qt5-core Analysis ======== PyQt5 does not install a PYI file containing type hints (PEP 484) unless the version of python is 3.5 or greater [0]. [0] https://docs.python.org/3/whatsnew/3.5.html#whatsnew-pep-484 Affected ports ============== devel/py-qt5-core x11-toolkits/py-qt5-widgets x11-toolkits/py-qt5-gui Changelog ========= * Predicate inclusion of PYI file on type hints added in python 3.5 * While here, strip share object QA == poudriere: OK -- testport on 10.4-RELEASE-p3 amd64 w/py27 (default), py34, py35, py36
Thanks for the patch. There are more PyQt ports that need this after ports r460809, but I was thinking of just patching configure.py and unconditionally install the type hints files instead of adding logic to almost every single PyQt5 port to handle the version checks.
A commit references this bug: Author: rakuco Date: Wed Feb 14 21:30:19 UTC 2018 New revision: 461841 URL: https://svnweb.freebsd.org/changeset/ports/461841 Log: PyQt: Unconditionally install the .pyi files r460809 started installing .pyi with the %%PYTHON3%% substitution in the plists. Support for .pyi files was added in Python 3.5, and PyQt's configure.py only installs the files on Python >= 3.5. This patch removes the version checks from configure.py (the files are just unused in earlier Python versions), as it is easier than checking Python 3's version in each PyQt port's Makefile (or to add the logic to Mk/Uses/pyqt.mk). PR: 225773 Reviewed by: tcberner Differential Revision: https://reviews.freebsd.org/D14361 Changes: head/comms/py-qt5-serialport/Makefile head/comms/py-qt5-serialport/pkg-plist head/databases/py-qt5-sql/Makefile head/databases/py-qt5-sql/pkg-plist head/devel/py-qt5-core/Makefile head/devel/py-qt5-core/files/patch-configure.py head/devel/py-qt5-core/pkg-plist head/devel/py-qt5-dbus/Makefile head/devel/py-qt5-dbus/pkg-plist head/devel/py-qt5-designer/Makefile head/devel/py-qt5-designer/pkg-plist head/devel/py-qt5-help/Makefile head/devel/py-qt5-help/pkg-plist head/devel/py-qt5-qscintilla2/Makefile head/devel/py-qt5-test/Makefile head/devel/py-qt5-test/pkg-plist head/graphics/py-qt5-svg/Makefile head/graphics/py-qt5-svg/pkg-plist head/lang/py-qt5-qml/Makefile head/lang/py-qt5-qml/pkg-plist head/multimedia/py-qt5-multimedia/Makefile head/multimedia/py-qt5-multimedia/pkg-plist head/multimedia/py-qt5-multimediawidgets/Makefile head/multimedia/py-qt5-multimediawidgets/pkg-plist head/net/py-qt5-network/Makefile head/net/py-qt5-network/pkg-plist head/print/py-qt5-printsupport/Makefile head/print/py-qt5-printsupport/pkg-plist head/textproc/py-qt5-xml/Makefile head/textproc/py-qt5-xml/pkg-plist head/textproc/py-qt5-xmlpatterns/Makefile head/textproc/py-qt5-xmlpatterns/pkg-plist head/www/py-qt5-webkit/Makefile head/www/py-qt5-webkit/pkg-plist head/www/py-qt5-webkitwidgets/Makefile head/www/py-qt5-webkitwidgets/pkg-plist head/x11/py-qt5-opengl/Makefile head/x11/py-qt5-opengl/pkg-plist head/x11-toolkits/py-qt5-gui/Makefile head/x11-toolkits/py-qt5-gui/pkg-plist head/x11-toolkits/py-qt5-quick/Makefile head/x11-toolkits/py-qt5-quick/pkg-plist head/x11-toolkits/py-qt5-widgets/Makefile head/x11-toolkits/py-qt5-widgets/pkg-plist
I ended up landing my version of the fix due to it being simpler. Could you submit another PR with the strip part? I think fixing that in Uses/pyqt.mk might be easier than repeating the code in all Makefiles.