Merge pull request #850 from ericfrederich/fix-requirements-fixer

Stop pkg_resources from being added as well
This commit is contained in:
Anthony Sottile 2024-04-06 14:35:41 -04:00 committed by GitHub
commit b73acb198e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -115,7 +115,10 @@ def fix_requirements(f: IO[bytes]) -> int:
# which is automatically added by broken pip package under Debian
requirements = [
req for req in requirements
if req.value != b'pkg-resources==0.0.0\n'
if req.value not in [
b'pkg-resources==0.0.0\n',
b'pkg_resources==0.0.0\n',
]
]
# sort the requirements and remove duplicates