Created attachment 190443 [details]
PyQt5: Fix plist under python 3.4
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
make: stopped in /usr/ports/devel/py-qt5-core
PyQt5 does not install a PYI file containing type hints (PEP 484) unless the version of python is 3.5 or greater .
* Predicate inclusion of PYI file on type hints added in python 3.5
* While here, strip share object
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:
Date: Wed Feb 14 21:30:19 UTC 2018
New revision: 461841
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).
Reviewed by: tcberner
Differential Revision: https://reviews.freebsd.org/D14361
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.