-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathsetup.py
More file actions
28 lines (22 loc) · 982 Bytes
/
setup.py
File metadata and controls
28 lines (22 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from setuptools import setup
def load_requirements(use_case: str) -> list[str]:
"""
Loading requirements.
These are not exactly-pinned versions.
For the standard packaging (as it should be here), we assume someone is installing FlexMeasures into an existing stack.
We want to avoid version clashes. That is why we read the .in file for the use case.
.txt files include the exact pins, and are useful for deployments with
exactly comparable environments. If you want those, install them before pip-installing FlexMeasures.
"""
reqs = []
with open("requirements/%s.in" % use_case, "r") as f:
reqs = [
req
for req in f.read().splitlines()
if not req.strip() == ""
and not req.strip().startswith("#")
and not req.strip().startswith("-c")
and not req.strip().startswith("--find-links")
]
return reqs
setup(install_requires=load_requirements("app"))