summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarrod Millman <jarrod.millman@gmail.com>2021-06-09 07:44:47 -0700
committerGitHub <noreply@github.com>2021-06-09 16:44:47 +0200
commitc568dcbac43a70b22e0c82b6201e77e7601868ee (patch)
tree6fb4b41c5e4b4c1ed5ce98941ef52e4a3743fd00
parent5bc077c27155649f2503150a2623f49de093b332 (diff)
downloadnetworkx-c568dcbac43a70b22e0c82b6201e77e7601868ee.tar.gz
Fix conda instructions (#4884)
* Fix conda instructions * New idea * fix to have conda avoid -r in requirements.txt and avoid ~=2.12 which is pip specific * Hopefully fix macos pypy loading * try again without wheel? * Avoid dependencies on PyPy Co-authored-by: Dan Schult <dschult@colgate.edu>
-rw-r--r--.github/workflows/test.yml4
-rw-r--r--CONTRIBUTING.rst6
-rw-r--r--INSTALL.rst9
-rw-r--r--requirements/default.txt8
-rw-r--r--requirements/developer.txt2
5 files changed, 19 insertions, 10 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 0d1d5f93..bf998628 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -48,8 +48,8 @@ jobs:
- name: Install packages
run: |
pip install --upgrade pip wheel setuptools
- pip install -r requirements.txt
- pip install .
+ pip install -r requirements/test.txt
+ pip install decorator . --no-deps
pip list
- name: Test NetworkX
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index d15747e1..4ad61d8c 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -45,7 +45,7 @@ Development Workflow
# Activate it
source networkx-dev/bin/activate
# Install main development and runtime dependencies of networkx
- pip install -r <(cat requirements/{default,developer,test}.txt)
+ pip install -r requirements.txt -r requirements/developer.txt
#
# (Optional) Install pygraphviz, pydot, and gdal packages
# These packages require that you have your system properly configured
@@ -66,12 +66,12 @@ Development Workflow
# Activate it
conda activate networkx-dev
# Install main development and runtime dependencies of networkx
- conda install -c conda-forge `for i in requirements/{default,developer,test}.txt; do echo -n " --file $i "; done`
+ conda install -c conda-forge --file requirements/default.txt --file requirements/test.txt --file requirements/developer.txt
#
# (Optional) Install pygraphviz, pydot, and gdal packages
# These packages require that you have your system properly configured
# and what that involves differs on various systems.
- # pip install -r requirements/extra.txt
+ # conda install -c conda-forge --file requirements/extra.txt
#
# Install networkx from source
pip install -e . --no-deps
diff --git a/INSTALL.rst b/INSTALL.rst
index 62033f1d..b9d85e40 100644
--- a/INSTALL.rst
+++ b/INSTALL.rst
@@ -32,6 +32,15 @@ install into your user directory using the ``--user`` flag::
$ pip install --user networkx
+If you do not want to install our dependencies (e.g., ``numpy``, ``scipy``, etc.),
+you can use::
+
+ $ pip install decorator networkx --no-deps
+
+This may be helpful if you are using PyPy or you are working on a project that
+only needs a limited subset of our functionality and you want to limit the
+number of dependencies.
+
Alternatively, you can manually download ``networkx`` from
`GitHub <https://github.com/networkx/networkx/releases>`_ or
`PyPI <https://pypi.python.org/pypi/networkx>`_.
diff --git a/requirements/default.txt b/requirements/default.txt
index 5c78e7c1..c404b5e8 100644
--- a/requirements/default.txt
+++ b/requirements/default.txt
@@ -1,5 +1,5 @@
decorator>=5.0.7,<6
-numpy>=1.19; platform_python_implementation!='PyPy' and python_version<'3.10'
-scipy>=1.5,!=1.6.1; platform_python_implementation!='PyPy' and python_version<'3.10'
-matplotlib>=3.3; platform_python_implementation!='PyPy' and python_version<'3.10'
-pandas>=1.1; platform_python_implementation!='PyPy' and python_version<'3.10'
+numpy>=1.19
+scipy>=1.5,!=1.6.1
+matplotlib>=3.3
+pandas>=1.1
diff --git a/requirements/developer.txt b/requirements/developer.txt
index 63f5dff3..efc4154b 100644
--- a/requirements/developer.txt
+++ b/requirements/developer.txt
@@ -1,2 +1,2 @@
black==21.5b1
-pre-commit~=2.12
+pre-commit>=2.12