Pylons / pyramid-cookiecutter-starter

A Cookiecutter (project template) for creating a Pyramid starter project with choices for template language (Jinja2, Chameleon, or Mako), persistent backend (none, SQLAlchemy with SQLite, or ZODB), and mapping of URLs to routes (URL dispatch or traversal)
95 stars 53 forks source link

Dependencies pyramid-jinja2 have a hyphen in pypi #135

Closed robvdl closed 8 months ago

robvdl commented 8 months ago

The scaffold lists some dependencies in setup.py with an underscore for example pyramid_jinja2 because that is what the project is called. However in pypi it's actually stored as pyramid-jinja2 with a hyphen.

This constantly triggers PyCharm saying "pyramid_jinja2 is not installed" so it could also be seen as a PyCharm bug, because pyramid-jinja2 with a hyphen is installed.

But it's easy enough to fix it in the project template by using the package name exactly as it is listed in pypi.

https://pypi.org/project/pyramid-jinja2/

mmerickel commented 8 months ago

That’s a bug in pycharm as both names are valid. You should open a ticket with them to normalize package names when doing any dependency resolution. The algorithm is defined in pep 503. https://peps.python.org/pep-0503/#normalized-names https://packaging.python.org/en/latest/specifications/name-normalization/

robvdl commented 8 months ago

Thanks for that link, that bug has been going on for years and years and normally I'll just rename the packages in my setup.py or requirements.txt whatever. I'll see if I can get them to finally fix it.

robvdl commented 8 months ago

I'm closing this as it is a PyCharm issue and I'm also seeing mixed behaviour there.