wolever / pip2pi

pip2pi builds a PyPI-compatible package repository from pip requirements
Other
753 stars 96 forks source link

Normalize package names in simple index #37

Closed wolever closed 7 years ago

wolever commented 9 years ago

It seems like pip[0] and bandersnatch[1] are now normalizing package names in the simple index, so for example simple/Django/Django-1.7.tar.gz becomes simple/dango/Django-1.7.tar.gz.

As of 0.6.5 pip2pi will include a --normalize-package-names option (default: disabled) and will issue a deprecation warning when it encounters a non-normalized package name. If no issues are found by about June 2015 --normalize-package-names will become the default.

Thanks to @orodbhen for initially reporting this: https://github.com/wolever/pip2pi/pull/35. See also: https://github.com/pypa/pip/issues/2136

0: https://github.com/pypa/pip/pull/2001 1: https://bitbucket.org/pypa/bandersnatch/pull-request/7/prefer-normalized-directory-names-but-keep/diff

wolever commented 9 years ago

And pip2pi 0.6.5 has been pushed to PyPI. Comments would be great!

jchysk commented 9 years ago

Works pretty well, but I still receive deprecation warnings on packages with underscores. Those underscores are checked as hyphens when the dependency is being grabbed.

adamkerz commented 9 years ago

pkg_resources.safe_name(x).lower() is what's being used in bandersnatch. Isn't that what we should be doing too?

mcameron commented 8 years ago

Installing httpretty with pip2pi --normalise-package-names errors with file not found readme.rst (file is README.rst). Installing without --normalise-package-names gives: WARNING: Non-normalized packages encountered.

wolever commented 7 years ago

The most recent version, 0.7.0rc1, should correctly normalize package names.

Would you be able to install it:

pip install pip2pi==0.7.0rc1

And, if it isn't fixed, can you comment on #55?