py-psyclone: add v3.0.0 (#47964)

* Update py-psyclone package to version 3.0.0
* Add Sergi and myself as maintainers
* correct case of url and add url_for_version() method
This commit is contained in:
Andy Porter 2024-12-11 19:51:14 +00:00 committed by GitHub
parent de1416b3de
commit fc4316cafa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,23 +8,28 @@
class PyPsyclone(PythonPackage):
"""
Code generation system developed to support domain-specific languages
(DSLs) for finite element, finite volume and finite difference codes.
Notably, it is used in the LFRic Project from the UK Met Office, and
it also supports the GOcean (2D, finite difference) DSL.
A source-to-source Fortran compiler designed to programmatically optimise,
parallelise and instrument HPC applications (written in Fortran) via user-
provided transformation scripts. Additionally, PSyclone supports the
development of kernel-based, Fortran-embedded DSLs and is used in the UK
Met Office's next-generation modelling system, LFRic.
"""
# Links
homepage = "https://github.com/stfc/PSyclone"
git = "https://github.com/stfc/PSyclone.git"
pypi = "PSyclone/PSyclone-2.5.0.tar.gz"
pypi = "PSyclone/psyclone-3.0.0.tar.gz"
# Maintainers
maintainers("arporter", "sergisiso", "TeranIvy", "hiker")
# License
license("BSD-3-Clause")
# Releases
version("develop", branch="master")
version("master", branch="master")
version("3.0.0", sha256="25085a6d0dad36c03ec1f06becf7e2f915ded26603d4a1a2981392f5752fdb3e")
version("2.5.0", sha256="dd1b40d635423c6b23effd2c569908d319afa6153680692e1cbae27f7b5bf4dc")
version("2.4.0", sha256="14fd3717f99b317471356c59c1d4c4c22c41fd264af11b78ed831dd2eb71a270")
version("2.3.1", sha256="eee70b3069d71fcf95e9bc8796f0333bd502e0202a98df051b635b133432a082")
@ -34,21 +39,23 @@ class PyPsyclone(PythonPackage):
version("2.0.0", sha256="94766ffda760404af99f85d70341376192e4a1b8e16e7ae5df980038898a9c41")
version("1.5.1", sha256="f053ad7316623b2a4002afc79607abda3b22306645e86f2312d9f3fe56d312dc")
depends_on("fortran", type="build") # generated
# Current dependencies
depends_on("py-setuptools", type="build")
depends_on("py-pyparsing", type=("build", "run"))
depends_on("py-fparser@0.1.4:", type=("build", "run"), when="@2.5.0")
depends_on("py-fparser@0.2.0:", type=("build", "run"), when="@3.0.0")
depends_on("py-graphviz", type=("build", "run"))
depends_on("py-configparser", type=("build", "run"))
depends_on("py-jsonschema", type=("build", "run"), when="@2.5.0")
depends_on("py-jinja2", type="build")
depends_on("py-jsonschema", type=("build", "run"), when="@2.5.0:")
depends_on("py-sympy", type=("build", "run"), when="@2.2.0:")
depends_on("py-termcolor", type=("build", "run"))
# Historical dependencies
depends_on("py-six", type=("build", "run"), when="@2.0.0:2.3.1")
depends_on("py-jsonschema@3.0.2", type=("build", "run"), when="@2.1.0:2.4.0")
# Test cases fail without compatible versions of py-fparser:
depends_on("py-fparser@0.1.4", type=("build", "run"), when="@2.5.0")
depends_on("py-fparser@0.1.3", type=("build", "run"), when="@2.4.0")
depends_on("py-fparser@0.0.16", type=("build", "run"), when="@2.3.1")
depends_on("py-fparser@0.0.15", type=("build", "run"), when="@2.3.0")
@ -57,16 +64,17 @@ class PyPsyclone(PythonPackage):
depends_on("py-fparser@0.0.12", type=("build", "run"), when="@2.0.0")
# Dependencies only required for tests:
depends_on("py-pep8", type="test")
depends_on("py-flake8", type="test")
depends_on("py-pylint@:2", type="test")
depends_on("py-pytest-cov", type="test")
depends_on("py-pytest-pep8", type="test")
depends_on("py-pytest-pylint", type="test")
depends_on("py-pytest-flakes", type="test")
depends_on("py-pytest-xdist", type="test")
depends_on("py-pytest", type="test")
def url_for_version(self, version):
# As of version 3.0.0, the name of the tarball on pypi is all lowercase.
name = "psyclone" if version >= Version("3.0.0") else "PSyclone"
return f"https://files.pythonhosted.org/packages/source/P/PSyclone/{name}-{version}.tar.gz"
# Test
@run_after("install")
@on_package_attributes(run_tests=True)