-
Notifications
You must be signed in to change notification settings - Fork 9
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
[packaging] move list of python project from requirements.txt into install_requires in setup.py #18
Comments
We are using "install_requires" in setup.py, Contents of the requirements.txt are automatically extracted and fed to "install_requires" [0], currently the performance_monitoring and alerting projects do not address that, @anmolbabu please refer to setup.py [0] 0 : https://github.com/Tendrl/node_agent/blob/master/setup.py#L25 |
@r0h4n my point here is that I would rather not use |
This topic was discussed on a meeting today, the summary follows:
I'm going to propose a pull request witch |
Based on agreement described in #18 (comment) (keep requirements.txt file), I'm closing this issue. Btw: Issue with missing installation requirements in setup.py is tracked in #17 |
After checking how tox.ini and travis are wired up during work on #24, I feel that we should not maintain requirements via |
Option install_requires in setup.py contains names of all python modules tednrl-alerting depends on, including tendrl-alerting. For development and CI purposes, there are requirements.txt files as well. The main difference between them is the github branch they use to install other tendrl components from: * requirements.develop.txt (uses develop branch) * requirements.master.txt (uses master branch) So in CI or development enviroment, one can install tendrl-alerting into virtualenv like this:: pip install -r requirements.master.txt Based on description from: * https://packaging.python.org/requirements/ * https://caremad.io/posts/2013/07/setup-vs-requirement/ tendrl-bug-id: Tendrl#17 tendrl-bug-id: Tendrl#18 tendrl-bug-id: Tendrl#37
This issue suggest to remove
requirements.txt
file and move items which this file contains intoinstall_requires
setuptools keyword insetup.py
file.Reasoning
Based on explanation of difference between
install_requires
keyword andrequirements.txt
file from upstream Python Packaging User Guide, I understand that:install_requires
requirements.txt
files are used to define the requirements for a complete python environmentSince this project is a single Tendrl component, which is expected to be installed with other Tendrl components together, using requirement file seems to be inappropriate. Listing dependencies of single reusable python library/tool/daemon, which is our case here, is not mentioned among 4 common uses of Requirements files as listed in description of the feature in packaging guide. Moreover, it creates additional issues:
requirements.txt
file makes us to install the project in non-production way, which means that we will find problems with listing requirements later than we should, see eg. issue [packaging] setup.py doesn't contain list of requirements #17 - this is very blatant issue, but was not noticed by any developer, unit tests or CI - since all of those are using installation method which doesn't resemble what an admin using this project would dorequirements.txt
file while specifyinginstall_requires
insetup.py
requires to maintain function to readrequirements.txt
file insetup.py
, which is unnecessary maintenance burdenrequirements.txt
is higher and includes features which should not be done in production setupThe text was updated successfully, but these errors were encountered: