Skip to content

Commit b6fc100

Browse files
authored
py_pysindy: New package (spack#2534)
* py_pysindy: new package * py_derivative: new package; dependency of the package py-pysindy * py_zipp: fix pyproject.toml
1 parent 1830a47 commit b6fc100

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright Spack Project Developers. See COPYRIGHT file for details.
2+
#
3+
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
4+
5+
from spack_repo.builtin.build_systems.python import PythonPackage
6+
7+
from spack.package import *
8+
9+
10+
class PyDerivative(PythonPackage):
11+
"""Numerical differentiation in python."""
12+
13+
homepage = "https://github.com/andgoldschmidt/derivative"
14+
pypi = "derivative/derivative-0.6.3.tar.gz"
15+
16+
maintainers("LydDeb")
17+
18+
license("MIT", checked_by="LydDeb")
19+
20+
version("0.6.3", sha256="72e7fd56e92665f939b5449c4b9ceea88fdf02eda7378cf0a3e961ab0df58181")
21+
22+
depends_on("[email protected]:", type=("build", "run"))
23+
depends_on("[email protected]:", type="build")
24+
depends_on("[email protected]:", type=("build", "run"))
25+
depends_on("[email protected]:", type=("build", "run"))
26+
depends_on("py-scikit-learn@1", type=("build", "run"))
27+
depends_on("[email protected]:", type=("build", "run"))
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright Spack Project Developers. See COPYRIGHT file for details.
2+
#
3+
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
4+
5+
from spack_repo.builtin.build_systems.python import PythonPackage
6+
7+
from spack.package import *
8+
9+
10+
class PyPysindy(PythonPackage):
11+
"""Sparse Identification of Nonlinear Dynamics"""
12+
13+
homepage = "https://github.com/dynamicslab/pysindy"
14+
pypi = "pysindy/pysindy-2.0.0.tar.gz"
15+
16+
maintainers("LydDeb")
17+
18+
license("MIT", checked_by="LydDeb")
19+
20+
version("2.0.0", sha256="a619980319d48ef0bfb364cfdf3a00f8ec585d69d32b92980bf79e89c43cf392")
21+
22+
depends_on("[email protected]:", type=("build", "run"))
23+
depends_on("py-setuptools", type="build")
24+
depends_on("py-setuptools-scm", type="build")
25+
depends_on("[email protected]:", type=("build", "run"))
26+
depends_on("py-numpy@2:", type=("build", "run"))
27+
depends_on("[email protected]:", type=("build", "run"))
28+
depends_on("py-scipy", type=("build", "run"))
29+
depends_on("py-typing-extensions", type=("build", "run"))
30+
31+
conflicts("^[email protected]")
32+
conflicts("^[email protected]")
33+
conflicts("^[email protected]")

repos/spack_repo/builtin/packages/py_zipp/package.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,10 @@ class PyZipp(PythonPackage):
3535

3636
# Historical dependencies
3737
depends_on("py-more-itertools", type=("build", "run"), when="@0.6.0:2.1.0")
38+
39+
# py-setuptools@61: supports PEP 621 which recommends the following syntax
40+
# license = { text = "MIT" }
41+
@when("^py-setuptools@61:")
42+
def patch(self):
43+
pyproject = "pyproject.toml"
44+
filter_file(r'license\s*=\s*"([^"]+)"', r'license = { text = "\1" }', pyproject)

0 commit comments

Comments
 (0)