Skip to content

Commit

Permalink
fix: pypi package should not pin dependencies precisely (#670)
Browse files Browse the repository at this point in the history
* fix: pypi package should not pin dependencies precisely

Signed-off-by: Nicolas Höning <nicolas@seita.nl>

* add docstring to explain why we use .in

---------

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
  • Loading branch information
nhoening authored May 9, 2023
1 parent d615144 commit be8a88e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@


def load_requirements(use_case):
"""
Loading range requirements.
Packaging should be used for installing the package into existing stacks.
We therefore read the .in file for the use case.
.txt files include the exact pins, and are useful for deployments with
exactly comparable environments.
"""
reqs = []
with open("requirements/%s.txt" % use_case, "r") as f:
with open("requirements/%s.in" % use_case, "r") as f:
reqs = [
req
for req in f.read().splitlines()
Expand Down

0 comments on commit be8a88e

Please sign in to comment.