I am preparing a python package for distribution. Currently it only has setup.cfg and pyproject.toml files (with no setup.py or requirements.txt). Inside setup.cfg I have install_requires
setup.cfg:
...
[options]
...
python_requires = >=3.6
install_requires=
requests>=2
numpy>=1.13
matplotlib>=2
.
.
.
...
Now, do I still need to provide a requirements.txt with specific versions of dependencies and sub-dependencies? Even if it is not strictly needed, are there any benefits to doing so?
My thoughts currently:
When I use don't have a requirements.txt, it automatically installs the latest version of the required packages which are available in that version of pip. And my package is installing and running in the limited number of environments I tested.
I understand that putting specific version numbers for dependencies can lightly guard against any breaking changes made by a dependency.
On the other hand, dependencies may stop supporting a specific version of python. So if I generate requirements.txt in python 3.8, the specific version of that dependency may not be available in python 3.6.