Development

Dependencies

For dependencies in this project we are following the guidelines from the Python Packaging Guide.

So in detail we are using the install_requires in the setup.py to specify a list of dependencies this project minimally needs to run correctly. Whereas in the requirements.txt we define the complete Python environment with pinned versions for the purpose of achieving repeatable installations. So the requirements.txt also includes the dependencies of the dependencies and the tools we are using for our setup.

So what has to be done, if you want to add a new dependency? Well simply try to follow the guideline in the Python Packaging Guide.

Also if you want to update the requirements.txt and don’t know how, the following steps might be handy.

# Create temporary virtual environment and install the current requirements
python3 -m venv /tmp/env
. /tmp/env/bin/activate
pip install -r requirements.txt
# Install your new fancy package
pip install my-fancy-package
# Update the whole list of dependencies
pip freeze > requirements.txt