Bug 258192

Summary: devel/py-pyinstaller: Fails to run on 3.8+. Fix incorrect Python <version-spec>, then update to latest version
Product: Ports & Packages Reporter: russo
Component: Individual Port(s)Assignee: freebsd-python (Nobody) <python>
Status: Open ---    
Severity: Affects Some People Keywords: needs-patch, needs-qa
Priority: --- Flags: bugzilla: maintainer-feedback? (python)
koobs: merge-quarterly?
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://github.com/pyinstaller/pyinstaller/issues/4580
Attachments:
Description Flags
Patch to update devel/py-pyiinstaller to current version none

Description russo 2021-09-01 05:44:01 UTC
Version 3.5 of py-pyinstaller, currently in ports, is incompatible with python 3.8.  When one tries to use it, one gets a TypeError:  https://github.com/pyinstaller/pyinstaller/issues/4580

They fixed this issue in version 4.1 of pyinstaller:  https://pyinstaller.readthedocs.io/en/stable/CHANGES.html#id1

The current version of pyinstaller is 4.5 and it works with more recent python.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-09-02 00:50:50 UTC
Thank you for the report.

Upstream (for 3.5) states:

  Works out-of-the-box with any Python version 2.7 / 3.4-3.7

Needs patch to correctly declare the supported Python version-spec: -3.7
Comment 2 russo 2021-09-02 02:27:42 UTC
Yes, the port should certainly prevent one from building/installing it with Python 3.8 (it will build just fine, but not work properly).  But it would be much, much better if the port could be updated to something that works with the current default version of Python.
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2021-09-06 01:02:42 UTC
(In reply to russo from comment #2)

Sure, though the bug in the current version of the port should be fixed before a version update, such that that change can be merged to the quarterly branch. Also: separate logically different unrelated changesets
Comment 4 russo 2021-09-06 01:22:16 UTC
That may be a decision you have to make for release engineering concerns, but I honestly don't care one whit if the current port is "fixed" so it refuses to install with Python 3.8 --- as it stands, python 3.8 is the default, and holding the port back at version 3.5 does me no good at all because there is no path forward to work I need to do using pyinstaller that worked right up until Python 3.8 became the default.

The reason I opened an issue was to ask for the port to be brought up to date, not to make the port have a python spec that prevents it from being installed.  Perhaps I should have said so in the title rather than just pointing out that it doesn't work.  Your title edit has changed the entire focus of my report.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2021-09-06 01:30:37 UTC
(In reply to russo from comment #4)

Fixing the bug does not preclude updating the port to support 3.8+. If you are able to, please include a patch updating the port to the latest version
Comment 6 russo 2021-09-06 18:21:20 UTC
Created attachment 227714 [details]
Patch to update devel/py-pyiinstaller to current version

This patch will update devel/py-pyinstaller from version 3.5 (which does not work with Python 3.8, even though it will build properly) to 4.5.1, which is the latest release version as of 7 August 2021.
Comment 7 russo 2021-09-06 18:25:29 UTC
As requested, I have attempted to patch the devel/py-pyinstaller port so that it will install 4.5.1 instead of 3.5.

This was a heavy-handed patch, because upstream have stopped bundling the documentation in the source tarball on PyPi.  It is still present in the Github repo for the project (https://github.com/pyinstaller/pyinstaller), but I did not want to try to modify the port to use the Github repo instead of CHEESESHOP.

Thus, I had to remove all of the parts of the makefile pertaining to documentation and man pages.

The new setup requires py-wheel, so I had to add that as a build depend.

I find, however, that USING pyinstaller now requires "pyinstaller-hooks-contrib", which I did NOT create a port for.  I simply used pip install to get at it, at which point pyinstaller now works correctly with Python 3.8.

I will understand if this patch is too rough to be committed, but this is what it took to get me back to work.