Skip to content
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 #118

Closed
mbukatov opened this issue Jan 3, 2017 · 2 comments

Comments

@mbukatov
Copy link
Contributor

mbukatov commented Jan 3, 2017

This issue suggest to remove requirements.txt file and move items which this file contains into install_requires setuptools keyword in setup.py file.

Reasoning

Based on explanation of difference between install_requires keyword and requirements.txt file from upstream Python Packaging User Guide, I understand that:

  • python project should provide minimal abstract list of projects which are needed to run it correctly in install_requires
  • requirements.txt files are used to define the requirements for a complete python environment

Since 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:

  • using 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 https://github.com/Tendrl/performance_monitoring/issues/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 do
  • keeping requirements.txt file while specifying install_requires in setup.py requires to maintain function to read requirements.txt file in setup.py, which is unnecessary maintenance burden
  • feature set of requirements.txt is higher and includes features which should not be done in production setup
@r0h4n
Copy link
Contributor

r0h4n commented Jan 5, 2017

We are using "install_requires" , https://github.com/Tendrl/node_agent/blob/master/setup.py#L25

@r0h4n r0h4n closed this as completed Jan 5, 2017
@mbukatov
Copy link
Contributor Author

mbukatov commented Jan 6, 2017

This issue was closed based on agreement described in Tendrl/notifier#18 (comment) (keep requirements.txt file).

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

No branches or pull requests

2 participants