[Bug 205308] devel/py-pip and devel/py-virtualenv don't aggree on version suffix
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Jul 14 10:52:44 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205308
--- Comment #3 from Kubilay Kocak <koobs at FreeBSD.org> ---
(In reply to Jan Beich from comment #2)
I didn't run through the steps, I was asking with hat @triage not @python,
apologies for not being less ambiguous.
A few notes:
The prefixes/suffixes set in python.mk are intended to standardize script
filenames for all python ports, which is the reason it's not override'able.
The pip* scripts provided by devel/py-pip, when invoked (either by the user, or
by blessings in this case), attempt to install the packages in the system
site-packages location, which requires root. This is the reason for the
permission denied error message. Using pip to manage system site-packages is
not supported, as per the devel/py-pip pkg-message.
virtualenv (the project) vendors (bundes) setuptools, pip & wheel packages, and
installs those versions when creating new environments. The devel/py-virtualenv
port does not unbundle them.
Once a virtualenv has been created, using the pip that's installed in the
virtualenv, correctly installs the desired packages:
(_virtualenv) [user at CURRENT-amd64:/usr/home/user/test/python/_virtualenv/bin]
pip install blessings
pip install blessings
Collecting blessings
Using cached blessings-1.6.tar.gz
Building wheels for collected packages: blessings
Running setup.py bdist_wheel for blessings ... done
Stored in directory:
/home/koobs/.cache/pip/wheels/a5/7c/ba/e52b14bbd1b8cdeeb0771b03e1cca9b9d438c6e0054144a508
Successfully built blessings
Installing collected packages: blessings
Successfully installed blessings-1.6
You are using pip version 8.0.0, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
This also works outside of _virtualenv/bin as virtualenv modifies the PATH to
pick up the scripts from the virtualenv that has been activated, before system
scripts.
(_virtualenv) [user at CURRENT-amd64:/usr/home/user/test] pip install requests
Collecting requests
Downloading requests-2.10.0-py2.py3-none-any.whl (506kB)
100% |████████████████████████████████| 507kB 224kB/s
Installing collected packages: requests
Successfully installed requests-2.10.0
You are using pip version 8.0.0, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
While one can acknowledge devel/pip does not use the default script names, it's
not yet clear how blessings finding pip-x.y before others implies that
devel/py-pip should change them, given it appears blessings would find
"pip2.7", "pip2", "pip" from the system after the change anyway, resulting in
the same permission denied error (as expected), or why virtualenv must follow
the same naming as pip, given it bundles and uses its own copies of pip.
Lastly, its possible, though in this case I'm not necessarily advocating for, a
port to use USES=uniquefiles directly, rather than python.mk's 'concurrent'
feature. This is the reason uniquefiles was created separately, to allow for
any ports (instead of just python ones) to use it.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the freebsd-python
mailing list