diff --git a/.appveyor.yml b/.appveyor.yml index 1ee0283965c..f4fd737f073 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -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 diff --git a/doc/developer/release.rst b/doc/developer/release.rst index 41379ea51e0..6d0fd701bfa 100644 --- a/doc/developer/release.rst +++ b/doc/developer/release.rst @@ -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/* diff --git a/setup.py b/setup.py index 6e9106bd85a..3c3d86c55fd 100644 --- a/setup.py +++ b/setup.py @@ -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: