summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJarrod Millman <jarrod.millman@gmail.com>2020-09-10 10:51:02 -0700
committerJarrod Millman <jarrod.millman@gmail.com>2020-09-15 20:00:19 -0700
commitcf5cc90b25fb53aec85c59d8d62fae3d3b05bc86 (patch)
treec0c4ffa514b0df4a184b51e359cd0a08d5bee4c0 /setup.py
parent79d6620a80427726aa9d540fbb75b5aa3b8c0b37 (diff)
downloadnetworkx-cf5cc90b25fb53aec85c59d8d62fae3d3b05bc86.tar.gz
Populate setup.py requires from requirements
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py27
1 files changed, 11 insertions, 16 deletions
diff --git a/setup.py b/setup.py
index 6e9106bd..3c3d86c5 100644
--- a/setup.py
+++ b/setup.py
@@ -124,23 +124,18 @@ package_data = {
"networkx.utils": ["tests/*.py"],
}
-install_requires = [
- "decorator>=4.3.0",
- "numpy>=1.19; platform_python_implementation!='PyPy' and python_version<'3.9'",
- "scipy>=1.4; platform_python_implementation!='PyPy' and python_version<'3.9'",
- "matplotlib>=3.2; platform_python_implementation!='PyPy' and python_version<'3.9'",
- "pandas>=1.0; platform_python_implementation!='PyPy' and python_version<'3.9'",
-]
+
+def parse_requirements_file(filename):
+ with open(filename, encoding="utf-8") as fid:
+ requires = [l.strip() for l in fid.readlines() if l]
+
+ return requires
+
+
+install_requires = parse_requirements_file("requirements/default.txt")
extras_require = {
- "extra": [
- "lxml>=4.5",
- "pygraphviz>=1.5, <2.0",
- "pydot>=1.4.1",
- "pyyaml>=5.3",
- ],
- "gdal": ["gdal"],
- "pydot": ["pydot"],
- "pygraphviz": ["pygraphviz"],
+ dep: parse_requirements_file("requirements/" + dep + ".txt")
+ for dep in ["developer", "doc", "extra", "test"]
}
with open("README.rst", "r") as fh: