Summary: | devel/py-virtualenv: 'make stage' fails with Permission Denied | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | John Hein <jcfyecrayz> | ||||
Component: | Individual Port(s) | Assignee: | Nicola Vitale <nivit> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | kirill, nivit | ||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(nivit) |
||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
John Hein
2023-02-10 12:10:52 UTC
Created attachment 240045 [details]
Fix build when a previous version of virtualenv is installed
Hi, can you try this patch, please?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a4431f26f3a69c55d0785aeb349f070c8bea1321 commit a4431f26f3a69c55d0785aeb349f070c8bea1321 Author: Nicola Vitale <nivit@FreeBSD.org> AuthorDate: 2023-02-10 16:25:04 +0000 Commit: Nicola Vitale <nivit@FreeBSD.org> CommitDate: 2023-02-10 16:31:02 +0000 devel/py-virtualenv: Fix build when a previous version is installed - Pass the option --ignore-installed to pip(1), because it tries to deinstall the previous version when installing the new one. This is safe because we install it in the stage dir. [1] - Fix build with Python < 3.9. Replace the switch -s (strip) with -d (destination dir), passed to module compileall.py, because the first is available only with Python 3.9+. [2] Reported error: ===> Staging for py38-virtualenv-20.18.0 ===> Generating temporary packing list Using pip 22.3.1 from /usr/local/lib/python3.8/site-packages/pip (python 3.8) Processing ./dist/virtualenv-20.18.0-py3-none-any.whl Installing collected packages: virtualenv changing mode of /wrkdirs/usr/ports/devel/py-virtualenv/work-py38/stage/usr/local/bin/virtualenv to 755 Successfully installed virtualenv-20.18.0 WARNING: There was an error checking the latest version of pip. /usr/local/bin/python3.8 /usr/local/lib/python3.8/compileall.py -s /wrkdirs/usr/ports/devel/py-virtualenv/work-py38/stage -f /wrkdirs/usr/ports/devel/py-virtualenv/work-py38/stage/usr/local/lib/python3.8/site -packages usage: compileall.py [-h] [-l] [-r RECURSION] [-f] [-q] [-b] [-d DESTDIR] [-x REGEXP] [-i FILE] [-j WORKERS] [--invalidation-mode {checked-hash,timestamp,unchecked-hash}] [FILE|DIR [FILE|DIR ...]] compileall.py: error: unrecognized arguments: -s /wrkdirs/usr/ports/devel/py-virtualenv/work-py38/stage/usr/local/lib/python3.8/site-packages *** Error code 2 PR: 269458 [1] Reported by: John Hein <jcfyecrayz@liamekaens.com> [1] Reported by: Кирилл Варнаков <kirill@varnakov.com> (via email) [2] devel/py-virtualenv/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) That seems to work in a quick test. I'm curious, however... why redefine all the PEP517_* values? What is wrong with the current default PEP517_*CMD for this port? I redefine PEP517_BUILD_*, because the virtualenv project use devel/py-hatchling to build, so, with the default variables, we would have one more (unnecessary) dependency (devel/py-build). About PEP517_INSTALL_*, the starting point is that I want to install the bytecode (al least until a definitive decision is made, see https://reviews.freebsd.org/D38429 ), but the default installer (devel/py-installer) does not record .pyc files in the RECORD file (they are optional after all - see https://peps.python.org/pep-0627/ ). The problem is that python.mk uses that file to create the PLIST file of the port (see https://github.com/freebsd/freebsd-ports/blob/b81b1236109378963da7ed1ada0e343e58aaeefb/Mk/Uses/python.mk#L861 ) and so the package is created without those bytecode files. That's all. :) |