-
Notifications
You must be signed in to change notification settings - Fork 474
Closed
Description
Describe the bug
pipx install --pip-args=--constraint=constraints.txt auditwheel
fails when constraints.txt
uses hashes.
This is most likely linked to pypa/pip#9243 but, as I saw the issue with pipx, I though I'd also report this here.
The use-case for this is to have some tools installed in a reproducible manner.
How to reproduce
[root@44456984b498 ~]# cat constraints.txt
auditwheel==4.0.0 \
--hash=sha256:03a079fe273f42336acdb5953ff5ce7578f93ca6a832b16c835fe337a1e2bd4a \
--hash=sha256:96927695ddf27b4edb67291e326908d64ffe272b8a42b9504f283e7ae5ebbc14
# via -r requirements-tools.in
pyelftools==0.27 \
--hash=sha256:5609aa6da1123fccfae2e8431a67b4146aa7fad5b3889f808df12b110f230937 \
--hash=sha256:cde854e662774c5457d688ca41615f6594187ba7067af101232df889a6b7a66b
# via auditwheel
[root@44456984b498 ~]# pipx install --pip-args=--constraint=constraints.txt --verbose auditwheel
pipx >(setup:717): pipx version is 0.16.3
pipx >(setup:718): Default python interpreter is '/opt/_internal/tools/bin/python'
pipx >(package_name_from_spec:323): Determined package name: auditwheel
pipx >(package_name_from_spec:324): Package name determined in 0.0s
creating virtual environment...
pipx >(run_subprocess:135): running /opt/_internal/tools/bin/python -m venv --without-pip /root/.local/pipx/venvs/auditwheel
pipx >(run_subprocess:135): running /root/.local/pipx/venvs/auditwheel/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx >(run_subprocess:135): running /root/.local/pipx/shared/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx >(run_subprocess:135): running /root/.local/pipx/venvs/auditwheel/bin/python --version
pipx >(_parsed_package_to_package_or_url:128): cleaned package spec: auditwheel
installing auditwheel...
pipx >(run_subprocess:135): running /root/.local/pipx/venvs/auditwheel/bin/python -m pip install --constraint=constraints.txt auditwheel
pipx >(subprocess_post_check_handle_pip_error:297): '/root/.local/pipx/venvs/auditwheel/bin/python -m pip install --constraint=constraints.txt auditwheel' failed
pipx >(subprocess_post_check_handle_pip_error:314): Fatal error from pip prevented installation. Full pip output in file:
/root/.local/pipx/logs/cmd_2021-07-04_12.33.00_pip_errors.log
pipx >(analyze_pip_output:272): pip seemed to fail to build package:
auditwheel
pipx >(rmdir:43): removing directory /root/.local/pipx/venvs/auditwheel
Error installing auditwheel.
[root@44456984b498 ~]# cat /root/.local/pipx/logs/cmd_2021-07-04_12.33.00_pip_errors.log
PIP STDOUT
----------
Collecting auditwheel
PIP STDERR
----------
ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
auditwheel from https://files.pythonhosted.org/packages/90/e1/4af4cbdef79dde083498ae408d629ce5d16728177b970c92344f433257a0/auditwheel-4.0.0-py3-none-any.whl#sha256=96927695ddf27b4edb67291e326908d64ffe272b8a42b9504f283e7ae5ebbc14
Expected behavior
package installed properly, respecting constraints
rittneje and danyeaw
Metadata
Metadata
Assignees
Labels
No labels