Add fenics development version and ufl-legacy (#42182)
* Add fenics development version and ufl-legacy * Make sure python and setuptools are added to ufl-legacy and add version 2022.3.0 as well * Run black and add maintainer to fenics package * Fix typo * Use Fiat version 2019.1.0 * Run black * Add back master branch of fiat * Remove master from the list of dolfin versions and add one extra line of each deps instead * Run black * Do not specify python version in ufl-legacy * Remove python dependency from ufl-legacy * Remove python dependency from ffc * Add special case for master in ffc * Run black * Remove master from loop in ffc * Run black again
This commit is contained in:
parent
7a712a11b9
commit
32230e6520
@ -18,9 +18,10 @@ class Fenics(CMakePackage):
|
|||||||
homepage = "https://fenicsproject.org/"
|
homepage = "https://fenicsproject.org/"
|
||||||
git = "https://bitbucket.org/fenics-project/dolfin.git"
|
git = "https://bitbucket.org/fenics-project/dolfin.git"
|
||||||
url = "https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-2019.1.0.post0.tar.gz"
|
url = "https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-2019.1.0.post0.tar.gz"
|
||||||
|
maintainers("chrisrichardson", "garth-wells", "jhale")
|
||||||
|
|
||||||
license("LGPL-3.0-only")
|
license("LGPL-3.0-only")
|
||||||
|
version("master", branch="master")
|
||||||
version(
|
version(
|
||||||
"2019.1.0.post0", sha256="61abdcdb13684ba2a3ba4afb7ea6c7907aa0896a46439d3af7e8848483d4392f"
|
"2019.1.0.post0", sha256="61abdcdb13684ba2a3ba4afb7ea6c7907aa0896a46439d3af7e8848483d4392f"
|
||||||
)
|
)
|
||||||
@ -90,7 +91,9 @@ class Fenics(CMakePackage):
|
|||||||
# fenics python package dependencies
|
# fenics python package dependencies
|
||||||
for ver in dolfin_versions:
|
for ver in dolfin_versions:
|
||||||
wver = "@" + ver
|
wver = "@" + ver
|
||||||
|
|
||||||
depends_on("py-fenics-fiat{0}".format(wver), type=("build", "run"), when=wver + "+python")
|
depends_on("py-fenics-fiat{0}".format(wver), type=("build", "run"), when=wver + "+python")
|
||||||
|
|
||||||
if Version(ver) < Version("2018.1.0"):
|
if Version(ver) < Version("2018.1.0"):
|
||||||
depends_on(
|
depends_on(
|
||||||
"py-fenics-instant{0}".format(wver), type=("build", "run"), when=wver + "+python"
|
"py-fenics-instant{0}".format(wver), type=("build", "run"), when=wver + "+python"
|
||||||
@ -99,11 +102,18 @@ class Fenics(CMakePackage):
|
|||||||
depends_on(
|
depends_on(
|
||||||
"py-fenics-dijitso{0}".format(wver), type=("build", "run"), when=wver + "+python"
|
"py-fenics-dijitso{0}".format(wver), type=("build", "run"), when=wver + "+python"
|
||||||
)
|
)
|
||||||
|
|
||||||
depends_on("py-fenics-ufl{0}".format(wver), type=("build", "run"), when=wver + "+python")
|
depends_on("py-fenics-ufl{0}".format(wver), type=("build", "run"), when=wver + "+python")
|
||||||
if ver in ["2019.1.0", "2017.2.0"]:
|
if ver in ["2019.1.0", "2017.2.0"]:
|
||||||
wver = "@" + ver + ".post0"
|
wver = "@" + ver + ".post0"
|
||||||
depends_on("py-fenics-ffc{0}".format(wver), type=("build", "run"), when=wver + "+python")
|
depends_on("py-fenics-ffc{0}".format(wver), type=("build", "run"), when=wver + "+python")
|
||||||
|
|
||||||
|
# Adding special case for master
|
||||||
|
depends_on("py-fenics-fiat@2019.1.0", type=("build", "run"), when="@master+python")
|
||||||
|
depends_on("py-fenics-dijitso@master", type=("build", "run"), when="@master+python")
|
||||||
|
depends_on("py-fenics-ufl-legacy@main", type=("build", "run"), when="@master+python")
|
||||||
|
depends_on("py-fenics-ffc@master", type=("build", "run"), when="@master+python")
|
||||||
|
|
||||||
# package dependencies
|
# package dependencies
|
||||||
depends_on("python@3.5:", type=("build", "run"), when="+python")
|
depends_on("python@3.5:", type=("build", "run"), when="+python")
|
||||||
depends_on("eigen@3.2.0:")
|
depends_on("eigen@3.2.0:")
|
||||||
|
@ -18,7 +18,7 @@ class PyFenicsFfc(PythonPackage):
|
|||||||
maintainers("emai-imcs")
|
maintainers("emai-imcs")
|
||||||
|
|
||||||
license("LGPL-3.0-or-later")
|
license("LGPL-3.0-or-later")
|
||||||
|
version("master", branch="master")
|
||||||
version(
|
version(
|
||||||
"2019.1.0.post0", sha256="306e1179630200a34202975a5369194939b3482eebfc34bc44ad74dab1f109e8"
|
"2019.1.0.post0", sha256="306e1179630200a34202975a5369194939b3482eebfc34bc44ad74dab1f109e8"
|
||||||
)
|
)
|
||||||
@ -28,8 +28,6 @@ class PyFenicsFfc(PythonPackage):
|
|||||||
)
|
)
|
||||||
version("2016.2.0", sha256="097c284780447ea7bb47d4d51956648a1efb2cb9047eb1382944421dde351ecb")
|
version("2016.2.0", sha256="097c284780447ea7bb47d4d51956648a1efb2cb9047eb1382944421dde351ecb")
|
||||||
|
|
||||||
depends_on("python@3.5:", type=("build", "run"))
|
|
||||||
|
|
||||||
depends_on("py-setuptools", type=("build", "run"))
|
depends_on("py-setuptools", type=("build", "run"))
|
||||||
depends_on("py-numpy", type=("build", "run"))
|
depends_on("py-numpy", type=("build", "run"))
|
||||||
|
|
||||||
@ -43,3 +41,7 @@ class PyFenicsFfc(PythonPackage):
|
|||||||
else:
|
else:
|
||||||
depends_on("py-fenics-dijitso{0}".format(wver), type=("build", "run"), when=wver)
|
depends_on("py-fenics-dijitso{0}".format(wver), type=("build", "run"), when=wver)
|
||||||
depends_on("py-fenics-ufl{0}".format(wver), type=("build", "run"), when=wver)
|
depends_on("py-fenics-ufl{0}".format(wver), type=("build", "run"), when=wver)
|
||||||
|
|
||||||
|
depends_on("py-fenics-fiat@2019.1.0", type=("build", "run"), when="@master")
|
||||||
|
depends_on("py-fenics-dijitso@master", type=("build", "run"), when="@master")
|
||||||
|
depends_on("py-fenics-ufl-legacy@main", type=("build", "run"), when="@master")
|
||||||
|
@ -0,0 +1,35 @@
|
|||||||
|
# Copyright 2013-2024 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 PyFenicsUflLegacy(PythonPackage):
|
||||||
|
"""The Unified Form Language (UFL) is a domain specific language for
|
||||||
|
declaration of finite element discretizations of variational forms. More
|
||||||
|
precisely, it defines a flexible interface for choosing finite element
|
||||||
|
spaces and defining expressions for weak forms in a notation close to
|
||||||
|
mathematical notation."""
|
||||||
|
|
||||||
|
homepage = "https://fenicsproject.org/"
|
||||||
|
url = "https://github.com/FEniCS/ufl-legacy/archive/2022.3.0.tar.gz"
|
||||||
|
git = "https://github.com/FEniCS/ufl-legacy.git"
|
||||||
|
maintainers("chrisrichardson", "garth-wells", "jhale")
|
||||||
|
|
||||||
|
license("LGPL-3.0-or-later")
|
||||||
|
|
||||||
|
version("main", branch="main")
|
||||||
|
version("2022.3.0", sha256="2d0f4c88fe151d631e1d389faf61f58bbbe649fd08106e756fd5d6c53213660a")
|
||||||
|
|
||||||
|
depends_on("py-setuptools@58:", type="build")
|
||||||
|
depends_on("py-numpy", type=("build", "run"))
|
||||||
|
|
||||||
|
depends_on("py-pytest", type="test")
|
||||||
|
|
||||||
|
@run_after("install")
|
||||||
|
@on_package_attributes(run_tests=True)
|
||||||
|
def check_build(self):
|
||||||
|
with working_dir("test"):
|
||||||
|
Executable("py.test")()
|
Loading…
Reference in New Issue
Block a user