-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow disabling of dependency installation in setup.py #1135
Allow disabling of dependency installation in setup.py #1135
Conversation
- Some Python dependencies are installed outside regular setuptools installation because are required by compilation of C++ code. Now this installation can be disabled setting the environment variable _DISABLE_DEPENDENCY_INSTALL to 1 or "On". - This commit also adds version checks when setup.py checks if those packages are available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, it might be worth pointing out that newer pip versions shouldn't need this because of the pyproject.toml build requirements outlining these. But it comes up enough that people are calling setup.py directly or using an older pip version that this doesn't work.
My only hesitation here is the additional use of distutils which will be deprecated in python 3.10: https://www.python.org/dev/peps/pep-0632/ they specifically call out strtobool as something we need to implement ourselves (https://www.python.org/dev/peps/pep-0632/#migration-advice ). Maybe for future proofing we do that in a follow up and write our own strtobool
I've added our won |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions for making the code a little easier to read
Summary
Some Python dependencies are installed outside regular
setuptools
installation because are requiredby compilation of C++ code. Now this installation can be disabled setting the environment variable
_DISABLE_DEPENDENCY_INSTALL to 1 or "On".
This commit also adds version checks on those packages when
setup.py
checks if they are already available.Details and comments
Fixes #1128