HomeFreeBSD

devel/py-virtualenv: Fix build when a previous version is installed

Description

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]

Details

Provenance
nivitAuthored on Feb 10 2023, 4:25 PM
Parents
R11:04c0110c8ac4: math/xspread: drop unused libpthread-stubs
Branches
Unknown
Tags
Unknown