Bug 225773 - devel/py-qt5-core: package phase fails under python 3.4 with plist error on PYI file
Summary: devel/py-qt5-core: package phase fails under python 3.4 with plist error on P...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Raphael Kubo da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-08 21:12 UTC by John W. O'Brien
Modified: 2018-03-31 11:18 UTC (History)
3 users (show)

See Also:
rakuco: maintainer-feedback+


Attachments
PyQt5: Fix plist under python 3.4 (4.01 KB, text/plain)
2018-02-08 21:12 UTC, John W. O'Brien
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John W. O'Brien 2018-02-08 21:12:17 UTC
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
Comment 1 Raphael Kubo da Costa freebsd_committer freebsd_triage 2018-02-10 20:02:30 UTC
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.
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-02-14 21:30:41 UTC
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
Comment 3 Raphael Kubo da Costa freebsd_committer freebsd_triage 2018-02-14 21:33:45 UTC
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.