summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Leute <36964815+alex391@users.noreply.github.com>2024-05-01 14:06:52 -0400
committerGitHub <noreply@github.com>2024-05-01 12:06:52 -0600
commit38c49d6b82d7ae458db4624f35b2c8326358f64a (patch)
treef0e2fb3182267e6b354c1b4efc72709199c67851
parent0d8900986daa6134f9172f28f19a4064c6ad41d7 (diff)
downloadspack-38c49d6b82d7ae458db4624f35b2c8326358f64a.tar.gz
spack-38c49d6b82d7ae458db4624f35b2c8326358f64a.tar.bz2
spack-38c49d6b82d7ae458db4624f35b2c8326358f64a.tar.xz
spack-38c49d6b82d7ae458db4624f35b2c8326358f64a.zip
py-simpy: New package (#43497)
* pypi build of py-simpy * [py-simpy] toml explicitly called out * py-simpy: New version * py-setuptools-scm: Added new version * py-setuptools-scm: add url_for_version Because versions @:7 have an underscore (setuptools_scm) in the URL, and newer versions have a dash (setuptools-scm). * py-setuptools-scm: fix flake8 line too long * py-simpy: Fix hash --------- Co-authored-by: Sid Pendelberry <sid@rit.edu> Co-authored-by: Jen Herting <jen@herting.cc>
-rw-r--r--var/spack/repos/builtin/packages/py-setuptools-scm/package.py10
-rw-r--r--var/spack/repos/builtin/packages/py-simpy/package.py21
2 files changed, 31 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-setuptools-scm/package.py b/var/spack/repos/builtin/packages/py-setuptools-scm/package.py
index 986b258334..f1ee81b5e9 100644
--- a/var/spack/repos/builtin/packages/py-setuptools-scm/package.py
+++ b/var/spack/repos/builtin/packages/py-setuptools-scm/package.py
@@ -15,6 +15,7 @@ class PySetuptoolsScm(PythonPackage):
license("MIT")
+ version("8.0.4", sha256="b5f43ff6800669595193fd09891564ee9d1d7dcb196cab4b2506d53a2e1c95c7")
version("7.1.0", sha256="6c508345a771aad7d56ebff0e70628bf2b0ec7573762be9960214730de278f27")
version("7.0.5", sha256="031e13af771d6f892b941adb6ea04545bbf91ebc5ce68c78aaf3fff6e1fb4844")
version("7.0.3", sha256="cf8ab8e235bed840cd4559b658af0d8e8a70896a191bbc510ee914ec5325332d")
@@ -36,6 +37,7 @@ class PySetuptoolsScm(PythonPackage):
depends_on("python@2.7:2.8,3.4:", type=("build", "run"))
depends_on("py-packaging@20.0:", when="@6.3:", type=("build", "run"))
+ depends_on("py-setuptools@61:", when="@8:", type=("build", "run"))
depends_on("py-setuptools@45:", when="@6:", type=("build", "run"))
depends_on("py-setuptools@42:", when="@5:", type=("build", "run"))
depends_on("py-setuptools@34.4:", type=("build", "run"))
@@ -47,3 +49,11 @@ class PySetuptoolsScm(PythonPackage):
depends_on("py-importlib-metadata", when="@7: ^python@:3.7", type=("build", "run"))
depends_on("git", type=("build", "run"))
+
+ def url_for_version(self, version):
+ # setuptools_scm-7.1.0.tar.gz with an underscore became
+ # setuptools-scm-8.0.4.tar.gz with a dash
+ url = super().url_for_version(version)
+ if version >= Version(8):
+ return url.replace("_", "-")
+ return url
diff --git a/var/spack/repos/builtin/packages/py-simpy/package.py b/var/spack/repos/builtin/packages/py-simpy/package.py
new file mode 100644
index 0000000000..03213f022d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-simpy/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack.package import *
+
+
+class PySimpy(PythonPackage):
+ """SimPy is a process-based discrete-event simulation framework based on standard Python."""
+
+ homepage = "https://simpy.readthedocs.io/"
+ pypi = "simpy/simpy-4.0.2.tar.gz"
+
+ version("4.1.1", sha256="06d0750a7884b11e0e8e20ce0bc7c6d4ed5f1743d456695340d13fdff95001a6")
+ version("4.0.2", sha256="6d8adc0229df6b02fb7e26dcd1338703b4f4f63f167a5ac2a7213cb80aba4484")
+
+ depends_on("py-setuptools@42:", type="build", when="@4.0.2")
+ depends_on("py-setuptools@64:", type="build", when="@4.1.1:")
+ depends_on("py-setuptools-scm@3.4:+toml", type="build", when="@4.0.2")
+ depends_on("py-setuptools-scm@8.0:+toml", type="build", when="@4.1.1:")