-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] DistributionNotFound error for ==x!y.z.*
dependency in editable-installed package
#3802
Comments
==x.y.*
==x!y.z.*
Hi @MetRonnie, thank you very much for reporting this. I think that this is probably related to upstream changes in Is there any chance you could reduce your reproducer to something more minimal we can test with different versions of |
A minimally example might be creating a package with # setup.cfg
[options]
install_requires =
metomi-isodatetime==1!3.0.* and # __init__.py
import pkg_resources haven't tried it yet so not sure if that's a reproduceable example however |
Ummm... this reproducer does not result in error: > docker run --rm -it python:3.7 /bin/bash
apt update
apt install -y libzmq3-dev build-essential
python3 -m venv /tmp/venv
mkdir /tmp/dummy-pkg
touch /tmp/dummy-pkg/pyproject.toml
cat <<EOF > /tmp/dummy-pkg/setup.cfg
[options]
install_requires =
metomi-isodatetime==1!3.0.*
EOF
/tmp/venv/bin/python -m pip install 'setuptools==67' /tmp/dummy-pkg
/tmp/venv/bin/python -c 'import pkg_resources' |
I don't think |
OK I have a minimal reproduceable example: https://gist.github.com/MetRonnie/f30efd9d2567c9e3091ceb4943d60227 The bug is only present when you've done an editable install ( |
==x!y.z.*
==x!y.z.*
dependency in editable-installed package
installing yearfrac breaks with
Looking at the PEP 508 version spec Who is right then? |
The error reported here is different from the one you're seeing @agroszer. |
@MetRonnie, we should be able to fix this once a new version of > docker run --rm -it python:3.7 /bin/bash
apt update
apt install -y libzmq3-dev build-essential
python3 -m venv /tmp/venv
## ---- Reproducer ----
git clone https://gist.github.com/f30efd9d2567c9e3091ceb4943d60227.git /tmp/dummy-pkg
cd /tmp/dummy-pkg
mkdir tmp
mv __init__.py tmp
## ---- Install and patch setuptools ----
/tmp/venv/bin/python -m pip install 'setuptools==67'
# patch `packaging` with its development version
git clone https://github.com/pypa/packaging /tmp/packaging
rm -rf /tmp/venv/lib/python3.7/site-packages/pkg_resources/_vendor/packaging
cp -r /tmp/packaging/src/packaging/ /tmp/venv/lib/python3.7/site-packages/pkg_resources/_vendor
## ---- Install project and run command ----
/tmp/venv/bin/python -m pip install -e .
/tmp/venv/bin/darmok
# => If you see this, all is well |
I have tested out with |
Once a new version of `packaging` has been released - pypa/setuptools#3802 (comment)
Once a new version of `packaging` has been released - pypa/setuptools#3802 (comment)
Once a new version of `packaging` has been released - pypa/setuptools#3802 (comment)
Once a new version of `packaging` has been released - pypa/setuptools#3802 (comment)
Now that |
Once a new version of `packaging` has been released - pypa/setuptools#3802 (comment)
Excluding v67 because of pypa/setuptools#3802
Excluding v67 because of pypa/setuptools#3802
setuptools version
setuptools==67.0.0
Python version
3.7-3.10
OS
RHEL 7, Ubuntu 22, MacOS 12
Additional environment information
Description
setuptools 67 is having a problem with a version specifier
==1!3.0.*
for a dependency of the package insetup.cfg
, whereas 66.1.1 did not have this problem. This only happens when the package was installed in editable mode (pip install -e .
), and only seems to affect dependencies specified with an epoch and*
at the end.Problem appears to be here: https://github.com/pypa/setuptools/blob/v67.0.0/pkg_resources/__init__.py#L840
Output while paused at breakpoint at that line:
Expected behavior
==1!3.0.*
should workHow to Reproduce
filetree.txt
: https://gist.github.com/MetRonnie/f30efd9d2567c9e3091ceb4943d60227pip install -e .
in the same directory assetup.cfg
darmok
Output
Also viewable here: https://github.com/MetRonnie/cylc-flow/actions/runs/4044453546/jobs/6954609806#step:10:71
The text was updated successfully, but these errors were encountered: