forked from jordansissel/fpm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix inconsistent naming between packages and dependencies
This works around: pypa/setuptools#2522 For example, when building a module which depends on 'backports_abc', fpm will currently translate that into a dependency on 'backports-abc'. When building the 'backports_abc' module, fpm will currently retain the original name. Thus, it is not possible to use fpm to meet some dependencies. Underscores should be allowed in package names, but the most important thing is to be internally consistent. Monkey-patch pkg_resources.safe_name() in order to allow underscores (default for fpm) or disallow underscores, according to user specification. If and when pkg_resources fixes safe_name(), then the behavior of fpm will remain the same. Note that this change matches both methods of loading requirements: * for setup.py, setuptools internally calls pkg_resources.safe_name() * for requirements.txt, pkg_resources uses its own safe_name()
- Loading branch information
Showing
3 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters