Quantcast
Viewing all articles
Browse latest Browse all 14040

How to reference a requirements.txt in the pyproject.toml of a setuptools project?

I'm trying to migrate a setuptools-based project from the legacy setup.py towards modern pyproject.toml configuration.

At the same time I want to keep well established workflows based on pip-compile, i.e., a requirements.in that gets compiled to a requirements.txt (for end-user / non-library projects of course). This has important benefits as a result of the full transparency:

  • 100% reproducible installs due to pinning the full transitive closure of dependencies.
  • better understanding of dependency conflicts in the transitive closure of dependencies.

For this reason I don't want to maintain the dependencies directly inside the pyproject.toml via a dependencies = [] list, but rather externally in the pip-compiled managed requirements.txt.

This makes me wonder: Is there a way to reference a requirements.txt file in the pyproject.toml configuration, without having to fallback to a setup.py script?


Viewing all articles
Browse latest Browse all 14040

Trending Articles