tamaas: added version 2.8.0 and petsc variant (#45267)
* tamaas: added version 2.8.0 * tamaas: added +petsc variant for extra solvers
This commit is contained in:
		| @@ -17,6 +17,7 @@ class Tamaas(SConsPackage): | |||||||
|     maintainers("prs513rosewood") |     maintainers("prs513rosewood") | ||||||
| 
 | 
 | ||||||
|     version("master", branch="master") |     version("master", branch="master") | ||||||
|  |     version("2.8.0", sha256="8ec49bf484a622c0554452416d1804eefbd545da79ced352f2ea63bbd17c83f0") | ||||||
|     version("2.7.1", sha256="d7de6db3f5532bb9c8ab7e8cca1cdb5c133050dd5720249dde07027b0d41641f") |     version("2.7.1", sha256="d7de6db3f5532bb9c8ab7e8cca1cdb5c133050dd5720249dde07027b0d41641f") | ||||||
|     version("2.7.0", sha256="bc5717c1ead621cb9c18a073fdafbe8778fd160ad23d80c98283445d79066579") |     version("2.7.0", sha256="bc5717c1ead621cb9c18a073fdafbe8778fd160ad23d80c98283445d79066579") | ||||||
|     version("2.6.0", sha256="4aafa0f727f43afc6ae45705ae80cf113a6a95e728bdf536c22b3b39be87f153") |     version("2.6.0", sha256="4aafa0f727f43afc6ae45705ae80cf113a6a95e728bdf536c22b3b39be87f153") | ||||||
| @@ -36,6 +37,7 @@ class Tamaas(SConsPackage): | |||||||
|         when="+python", |         when="+python", | ||||||
|         description="Enables extra Scipy-based nonlinear solvers", |         description="Enables extra Scipy-based nonlinear solvers", | ||||||
|     ) |     ) | ||||||
|  |     variant("petsc", default=False, when="@2.8.0:", description="Additional PETSc solvers") | ||||||
| 
 | 
 | ||||||
|     # Python 3.6 causes unicode issues with scons |     # Python 3.6 causes unicode issues with scons | ||||||
|     depends_on("python@3.7:", type="build", when="~python") |     depends_on("python@3.7:", type="build", when="~python") | ||||||
| @@ -63,6 +65,8 @@ class Tamaas(SConsPackage): | |||||||
|         depends_on("py-wheel", type="build") |         depends_on("py-wheel", type="build") | ||||||
|         depends_on("py-pip", type="build") |         depends_on("py-pip", type="build") | ||||||
| 
 | 
 | ||||||
|  |     depends_on("petsc", type="build", when="+petsc") | ||||||
|  | 
 | ||||||
|     def build_args(self, spec, prefix): |     def build_args(self, spec, prefix): | ||||||
|         args = [ |         args = [ | ||||||
|             "build_type=release", |             "build_type=release", | ||||||
| @@ -85,6 +89,9 @@ def build_args(self, spec, prefix): | |||||||
|         if spec.satisfies("+python"): |         if spec.satisfies("+python"): | ||||||
|             args += ["PYBIND11_ROOT={}".format(spec["py-pybind11"].prefix)] |             args += ["PYBIND11_ROOT={}".format(spec["py-pybind11"].prefix)] | ||||||
| 
 | 
 | ||||||
|  |         if spec.satisfies("+petsc"): | ||||||
|  |             args += ["PETSC_ROOT={}".format(spec["petsc"].prefix), "use_petsc=True"] | ||||||
|  | 
 | ||||||
|         return args |         return args | ||||||
| 
 | 
 | ||||||
|     def install(self, spec, prefix): |     def install(self, spec, prefix): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Lucas Frérot
					Lucas Frérot