-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Benjamin Rodenberg <[email protected]>
- Loading branch information
1 parent
00fa2c0
commit c5b19c7
Showing
3 changed files
with
20 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
spack/repo/packages/py-pyprecice/deactivate-version-check-via-pip.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,13 @@ class PyPyprecice(PythonPackage): | |
homepage = "https://www.precice.org" | ||
git = "https://github.com/precice/python-bindings.git" | ||
url = "https://github.com/precice/python-bindings/archive/v2.0.0.1.tar.gz" | ||
maintainers = ["ajaust", "BenjaminRodenberg"] | ||
maintainers = ["ajaust", "BenjaminRodenberg", "IshaanDesai"] | ||
|
||
# Always prefer final version of release candidate | ||
version("develop", branch="develop") | ||
version('2.2.0.1', sha256='032fa58193cfa69e3be37557977056e8f507d89b40c490a351d17271269b25ad') | ||
version('2.2.1.1', sha256='d96674f1ff91761c29efce34f8e09e2ec29a4862227b7204439e865dbe755a86') | ||
version('2.2.0.2', sha256='2287185f9ad7500dced53459543d27bb66bd2438c2e4bf81ee3317e6a00513d5') | ||
version('2.2.0.1', sha256='229625e2e6df03987ababce5abe2021b0974cbe5a588b936a9cba653f4908d4b') | ||
version('2.1.1.2', sha256='363eb3eeccf964fd5ee87012c1032353dd1518662868f2b51f04a6d8a7154045') | ||
version("2.1.1.1", sha256="972f574549344b6155a8dd415b6d82512e00fa154ca25ae7e36b68d4d2ed2cf4") | ||
version("2.1.0.1", sha256="ac5cb7412c6b96b08a04fa86ea38e52d91ea739a3bd1c209baa93a8275e4e01a") | ||
|
@@ -28,35 +30,25 @@ class PyPyprecice(PythonPackage): | |
version("2.0.0.2", sha256="5f055d809d65ec2e81f4d001812a250f50418de59990b47d6bcb12b88da5f5d7") | ||
version("2.0.0.1", sha256="96eafdf421ec61ad6fcf0ab1d3cf210831a815272984c470b2aea57d4d0c9e0e") | ||
|
||
# Older versions of the bindings checked versions via pip. This patch | ||
# removes the pip dependency. | ||
# See also https://github.com/spack/spack/pull/19558 | ||
patch("deactivate-version-check-via-pip.patch", when="@:2.1.1.1") | ||
|
||
depends_on("precice@develop", when="@develop") | ||
depends_on("[email protected]", when="@2.2.1.1:2.2.1.99") | ||
depends_on("[email protected]", when="@2.2.0.1:2.2.0.99") | ||
depends_on("[email protected]", when="@2.1.1.1:2.1.1.99") | ||
depends_on("[email protected]", when="@2.1.0.1:2.1.0.99") | ||
depends_on("[email protected]", when="@2.0.2.1:2.0.2.99") | ||
depends_on("[email protected]", when="@2.0.1.1:2.0.1.99") | ||
depends_on("[email protected]", when="@2.0.0.1:2.0.0.99") | ||
|
||
depends_on("python@3:", type=("build", "run")) | ||
depends_on("python@3:", type=("build", "link", "run")) | ||
depends_on("py-setuptools", type="build") | ||
depends_on("py-numpy", type=("build", "run")) | ||
depends_on("py-numpy", type=("build", "link", "run")) | ||
depends_on("py-mpi4py", type=("build", "run")) | ||
depends_on("[email protected]:", type=("build")) | ||
|
||
phases = ['install_lib', 'build_ext', 'install'] | ||
|
||
def build_ext_args(self, spec, prefix): | ||
return [ | ||
"--include-dirs=" + spec["precice"].headers.directories[0], | ||
"--library-dirs=" + spec["precice"].libs.directories[0] | ||
] | ||
|
||
def install(self, spec, prefix): | ||
# Older versions of the bindings had a non-standard installation routine | ||
# See also https://github.com/spack/spack/pull/19558#discussion_r513123239 | ||
if self.version <= Version("2.1.1.1"): | ||
self.setup_py("install", "--prefix={0}".format(prefix)) | ||
depends_on("[email protected]:", type="build") | ||
depends_on("py-packaging", when="@:2.1", type="build") | ||
depends_on("py-pip", when="@:2.1", type="build") | ||
|
||
@when("@:2.1") | ||
def patch(self): | ||
filter_file( | ||
"distutils.command.install", "setuptools.command.install", "setup.py" | ||
) |