Skip to content

Drop pkg_resources from setup.py - #221

Open
itzzdev09 wants to merge 1 commit into
netinvent:mainfrom
itzzdev09:drop-pkg-resources
Open

itzzdev09 wants to merge 1 commit into
netinvent:mainfrom
itzzdev09:drop-pkg-resources

Conversation

@itzzdev09

Copy link
Copy Markdown

setup.py uses pkg_resources.parse_requirements in its parse_requirements() helper. setuptools 82 removed pkg_resources, so building or installing NPBackup from source with a current setuptools fails with ModuleNotFoundError: No module named 'pkg_resources'.

The helper now reads the requirements file line by line (dropping blank lines, whole-line comments, trailing # comments and pip options; environment markers are kept). On the current npbackup/requirements.txt (31 entries) it gives the same requirements as pkg_resources.parse_requirements from setuptools 81, compared after parsing with packaging.requirements.Requirement. I did not run a full build.

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

Successfully merging this pull request may close these issues.

1 participant