Skip to content

Commit

Permalink
Populate setup.py requires from requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrodmillman committed Sep 16, 2020
1 parent 79d6620 commit cf5cc90
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
1 change: 1 addition & 0 deletions .appveyor.yml
Expand Up @@ -36,6 +36,7 @@ install:

# Install the build and runtime dependencies of the project.
- "python -m pip install --upgrade pip wheel setuptools"
- "pip install -r requirements.txt"
- "pip install ."

# Not a .NET project, we build networkx in the install step instead
Expand Down
1 change: 1 addition & 0 deletions doc/developer/release.rst
Expand Up @@ -57,6 +57,7 @@ Release Process
- Publish on PyPi::

git clean -fxd
pip install -r requirements/release.txt
python setup.py sdist bdist_wheel
twine upload -s dist/*

Expand Down
27 changes: 11 additions & 16 deletions setup.py
Expand Up @@ -124,23 +124,18 @@
"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:
Expand Down

0 comments on commit cf5cc90

Please sign in to comment.