xar
xar copied to clipboard
Unable to use xar from a venv
Hey, thanks for a cool project— I noted that when I install xar in a venv, it doesn't work:
$ path/to/my/xar_env/bin/python setup.py bdist_xar
running bdist_xar
removing 'build/bdist.linux-x86_64/xar' (and everything under it)
error: [Errno 2] No such file or directory: 'build/bdist.linux-x86_64/xar'
I see the same result when I source bin/activate
in that virtualenv and also if my project is installed into the virtualenv. It only works as expected if I pip3 install xar
system-wide (undesirable, especially for many CI setups). Is there something I'm missing here to make this work? Thanks again.
It is particularly a problem because xar also seems to pick up (and then complain about) system dependency versions even when it has downloaded the correct/newer ones, eg:
Collecting paramiko-expect
Using cached paramiko_expect-0.2.8-py2.py3-none-any.whl (11 kB)
Saved ./build/bdist.linux-x86_64/xar/downloads/paramiko_expect-0.2.8-py2.py3-none-any.whl
Collecting paramiko>=1.10.1
File was already downloaded path/to/my/project/build/bdist.linux-x86_64/xar/downloads/paramiko-2.7.1-py2.py3-none-any.whl
Collecting bcrypt>=3.1.3
File was already downloaded path/to/my/project/build/bdist.linux-x86_64/xar/downloads/bcrypt-3.1.7-cp34-abi3-manylinux1_x86_64.whl
Collecting cryptography>=2.5
File was already downloaded path/to/my/project/build/bdist.linux-x86_64/xar/downloads/cryptography-2.9.2-cp35-abi3-manylinux2010_x86_64.whl
Collecting pynacl>=1.0.1
File was already downloaded path/to/my/project/build/bdist.linux-x86_64/xar/downloads/PyNaCl-1.4.0-cp35-abi3-manylinux1_x86_64.whl
Collecting cffi>=1.1
File was already downloaded path/to/my/project/build/bdist.linux-x86_64/xar/downloads/cffi-1.14.0-cp35-cp35m-manylinux1_x86_64.whl
Collecting six>=1.4.1
File was already downloaded path/to/my/project/build/bdist.linux-x86_64/xar/downloads/six-1.15.0-py2.py3-none-any.whl
Collecting pycparser
File was already downloaded path/to/my/project/build/bdist.linux-x86_64/xar/downloads/pycparser-2.20-py2.py3-none-any.whl
Successfully downloaded paramiko-expect paramiko bcrypt cryptography pynacl cffi six pycparser
WARNING: You are using pip version 20.0.2; however, version 20.1.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
removing 'build/bdist.linux-x86_64/xar' (and everything under it)
Traceback (most recent call last):
File "setup.py", line 25, in <module>
'tqdm'
File "/usr/local/lib/python3.5/dist-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/dist-packages/xar/commands/bdist_xar.py", line 231, in run
deps = self._deps(dist)
File "/usr/local/lib/python3.5/dist-packages/xar/commands/bdist_xar.py", line 193, in _deps
requires, extras=extras, installer=self.installer
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 792, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (cryptography 1.2.3 (/usr/lib/python3/dist-packages), Requirement.parse('cryptography>=2.5'), {'paramiko'})
I don't think any of this would be an issue if xar were used from a clean environment.
I'm using Ubuntu; I can reproduce this behaviour on both Ubuntu Xenial (Python 3.5) and Ubuntu Focal (Python 3.8).
I'm running into a similar issue on macOS when following this example
$ /tmp/xar/bin/python setup.py bdist_xar
running bdist_xar
removing 'build/bdist.macosx-10.14-x86_64/xar' (and everything under it)
error: [Errno 2] No such file or directory: 'build/bdist.macosx-10.14-x86_64/xar'