Skip to content
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

Package name causes issues when combining requirements #255

Closed
Jorricks opened this issue Mar 11, 2022 · 4 comments
Closed

Package name causes issues when combining requirements #255

Jorricks opened this issue Mar 11, 2022 · 4 comments

Comments

@Jorricks
Copy link

Jorricks commented Mar 11, 2022

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

What I did:

I created a small setup.py and listed a package that has zope-interface==5.4.0 as requirement. I used pip-tools to compile the package, which leads to zope-interface==5.4.0 being added.
When I install the package I get

Requirement already satisfied: zope-interface==5.4.0 in /Users/jorrick/my_venv/lib/python3.8/site-packages (5.4.0)

Then when I try to run my entry_point console_scripts, I get

pkg_resources.DistributionNotFound: The 'zope-interface==5.4.0' distribution was not found and is required by my_package

But when I run pip3 freeze, I get

zope.interface==5.4.0

What I expect to happen:

That I am able to run my CLI commands without issues

What actually happened:

It throws a DistributionNotFound error.

What version of Python and Zope/Addons I am using:

Python3.8
zope.event==4.5.0
zope.interface==5.4.0

on MacOs

@d-maurer
Copy link
Contributor

d-maurer commented Mar 11, 2022 via email

@Jorricks
Copy link
Author

Yess I think you are right and I need to take this up with pip-tools instead of this repository.

@Jorricks
Copy link
Author

Opened jazzband/pip-tools#1599 with pip-tools

@jamadden
Copy link
Member

jamadden commented Mar 11, 2022

This is a constant struggle, because, according to PEP 503, . gets normalized away to - for purposes of interacting with PyPI indexes. But that normalization is often inconsistently applied or applied to places it shouldn't be.

$ pip -vv index versions zope.interface
1 location(s) to search for versions of zope.interface:
* https://pypi.org/simple/zope-interface/
Fetching project page and analyzing links: https://pypi.org/simple/zope-interface/
Getting page https://pypi.org/simple/zope-interface/

zope.interface (5.4.0)
Available versions: 5.4.0, 5.3.0, 5.2.0, 5.1.2, 5.1.1, 5.1.0, 5.0.2, 5.0.1, 5.0.0, 4.7.2, 4.7.1, 4.7.0, 4.6.0, 4.5.0, 4.4.3, 4.4.2, 4.4.1, 4.4.0, 4.3.3, 4.3.2, 4.3.1, 4.3.0, 4.2.0, 4.1.3, 4.1.2, 4.1.1, 4.1.0, 4.0.5, 4.0.4, 4.0.3, 4.0.2, 4.0.1, 4.0.0, 3.8.0, 3.7.0, 3.6.8, 3.6.7, 3.6.6, 3.6.5, 3.6.4, 3.6.3, 3.6.2, 3.6.1, 3.6.0, 3.5.3, 3.5.2, 3.5.1, 3.5.0, 3.4.1, 3.4.0, 3.3.0.1, 3.3.0
  INSTALLED: 5.4.0
  LATEST:    5.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants