summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-networkx/package.py54
1 files changed, 35 insertions, 19 deletions
diff --git a/var/spack/repos/builtin/packages/py-networkx/package.py b/var/spack/repos/builtin/packages/py-networkx/package.py
index ad2a37e17e..01fc91904e 100644
--- a/var/spack/repos/builtin/packages/py-networkx/package.py
+++ b/var/spack/repos/builtin/packages/py-networkx/package.py
@@ -12,7 +12,9 @@ class PyNetworkx(PythonPackage):
homepage = "https://networkx.github.io/"
pypi = "networkx/networkx-2.4.tar.gz"
+ git = "https://github.com/networkx/networkx.git"
+ version("3.1", sha256="de346335408f84de0eada6ff9fafafff9bcda11f0a0dfaa931133debb146ab61")
version("2.8.6", sha256="bd2b7730300860cbd2dafe8e5af89ff5c9a65c3975b352799d87a6238b4301a6")
version("2.7.1", sha256="d1194ba753e5eed07cdecd1d23c5cd7a3c772099bd8dbd2fea366788cf4de7ba")
version("2.6.3", sha256="c0946ed31d71f1b732b5aaa6da5a0388a345019af232ce2f49c766e2d6795c51")
@@ -26,32 +28,46 @@ class PyNetworkx(PythonPackage):
version("1.11", sha256="0d0e70e10dfb47601cbb3425a00e03e2a2e97477be6f80638fef91d54dd1e4b8")
version("1.10", sha256="ced4095ab83b7451cec1172183eff419ed32e21397ea4e1971d92a5808ed6fb8")
+ variant("default", default=True, description="Enable installation of default dependencies.")
+
+ # variant would be available for earlier versions as well, but then the
+ # dependencies increase a lot
variant(
"extra",
- description="Optional requirements that may require extra steps to install",
default=False,
+ when="@2.5:",
+ description="Optional requirements that may require extra steps to install",
)
- depends_on("python@2.7:", type=("build", "run"))
- depends_on("python@3.5:", when="@2.3:", type=("build", "run"))
- depends_on("python@3.6:", when="@2.5:", type=("build", "run"))
- depends_on("python@3.7:", when="@2.6:", type=("build", "run"))
depends_on("python@3.8:", when="@2.7:", type=("build", "run"))
+ depends_on("python@3.7:", when="@2.6:", type=("build", "run"))
depends_on("py-setuptools", type="build")
- depends_on("py-decorator@3.4.0:", when="@:1", type=("build", "run"))
- depends_on("py-decorator@4.1.0:", when="@2.0:2.1", type=("build", "run"))
- depends_on("py-decorator@4.3.0:", when="@2.2:2.4", type=("build", "run"))
- depends_on("py-decorator@4.3.0:4", when="@2.5.1:2.5", type=("build", "run"))
- # From requirements/default.txt
- depends_on("py-numpy@1.19:", when="@2.8.6:", type=("build", "run"))
- depends_on("py-scipy@1.8:", when="@2.8.6:", type=("build", "run"))
- depends_on("py-matplotlib@3.4:", when="@2.8.6:", type=("build", "run"))
- depends_on("py-pandas@1.3:", when="@2.8.6:", type=("build", "run"))
- # From requirements/extra.txt
- depends_on("py-lxml@4.6:", when="@2.8.6:+extra", type=("build", "run"))
- depends_on("py-pygraphviz@1.9:", when="@2.8.6:+extra", type=("build", "run"))
- depends_on("py-pydot@1.4.2:", when="@2.8.6:+extra", type=("build", "run"))
- depends_on("py-sympy@1.10:", when="@2.8.6:+extra", type=("build", "run"))
+
+ with when("+default"):
+ # From requirements/default.txt
+ depends_on("py-numpy@1.20:", when="@3:", type=("build", "run"))
+ depends_on("py-numpy@1.19:", when="@2.8.6:", type=("build", "run"))
+ depends_on("py-scipy@1.8:", when="@2.8.6:", type=("build", "run"))
+ depends_on("py-matplotlib@3.4:", when="@2.8.6:", type=("build", "run"))
+ depends_on("py-pandas@1.3:", when="@2.8.6:", type=("build", "run"))
+
+ # Historical dependencies
+ depends_on("py-decorator@4.3.0:4", when="@2.5.1:2.5", type=("build", "run"))
+ depends_on("py-decorator@4.3.0:", when="@2.2:2.4", type=("build", "run"))
+ depends_on("py-decorator@4.1.0:", when="@2.0:2.1", type=("build", "run"))
+ depends_on("py-decorator@3.4.0:", when="@:1", type=("build", "run"))
+
+ with when("+extra"):
+ # From requirements/extra.txt
+ depends_on("py-lxml@4.6:", when="@2.7:", type=("build", "run"))
+ depends_on("py-lxml@4.5:", when="@2.6:", type=("build", "run"))
+ depends_on("py-pygraphviz@1.10:", when="@3:", type=("build", "run"))
+ depends_on("py-pygraphviz@1.9:", when="@2.7:", type=("build", "run"))
+ depends_on("py-pygraphviz@1.7:", when="@2.6:", type=("build", "run"))
+ depends_on("py-pygraphviz@1.5:1", type=("build", "run"))
+ depends_on("py-pydot@1.4.2:", when="@2.7:", type=("build", "run"))
+ depends_on("py-pydot@1.4.1:", type=("build", "run"))
+ depends_on("py-sympy@1.10:", when="@2.8:", type=("build", "run"))
def url_for_version(self, version):
ext = "tar.gz"