You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for the delay. I will try and test it out, but it only showed up for us in the last week or so, I think with a change in the version of pip inside conda-forge.
Description
When using tools like
setuptools-scm
for automatic git versioning we get semi random versions. For instance:mypackage-0.6.1.dev18+g238ae95057-py3-none-any.whl
To workaround this in CI pipelines we have previously created symlinks like the following:
mypackage-latest-py3-none-any.whl -> mypackage-0.6.1.dev18+g238ae95057-py3-none-any.whl
and then test inspecting, installing, etc. the
mypackage-latest-py3-none-any.whl
file.However, recently this started failing with messages like the following:
conda run pip install "mypackage/dist/tmp/mypackage-latest-py3-none-any.whl[full-tests]"
However, inside the
whl
file the appropriate version is listed in theMETADATA
.This doesn't happen if we do the following instead:
conda run pip install "`readlink -f mypackage/dist/tmp/mypackage-latest-py3-none-any.whl`[full-tests]"
In effect, we ask it to install the full path to the target file instead (i.e.,
mypackage-0.6.1.dev18+g238ae95057-py3-none-any.whl
).This seems like a recent regression in that it is using the version from the filename instead of from the whl METADATA.
Version info:
# pip --version pip 24.2 from /opt/conda/lib/python3.12/site-packages/pip (python 3.12)
Expected behavior
pip should read version info from the whl file, not the filename argument, or at least the absolute file path.
pip version
24.2
Python version
3.12
OS
Linux
How to Reproduce
cd mypackage
python -m build
ln -s dist/mypackage-*-py3-none-any.whl dist/mypackage-latest-none-any.whl
pip install dist/mypackage-latest-none-any.whl
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: