0

I am maintaining a requirements.txt file for my Python project, including version numbers and hashes for each package. (This is so I can install with pip install --no-deps --require-hashes.)

Some packages in the list are my actual requirements (for example, Sphinx) while others are just dependencies of those requirements (for example, everything else you get when you pip install Sphinx).

I want to maintain this list of requirements separately from those dependencies. How can I do this?

lofidevops
  • 15,528
  • 14
  • 79
  • 119

1 Answers1

0

At the moment I have simply split my requirements into two files (see below, simplified for readability). But I am not sure how maintainable this will be (false retentions, handling dependency updates...).

requirements.txt

# these are my actual requirements
-r dependencies.txt
Sphinx

dependencies.txt

# these are the dependencies of my actual requirements
alabaster
Babel
certifi
chardet
docutils
idna
imagesize
Jinja2
MarkupSafe
Pygments
pytz
requests
six
snowballstemmer
sphinxcontrib-websupport
urllib3
lofidevops
  • 15,528
  • 14
  • 79
  • 119