-
Notifications
You must be signed in to change notification settings - Fork 512
adiak: Update Package for v0.5.0 Release #2300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ad3ec73
Add python variant to adiak package
michaelmckinsey1 6a360a4
Merge branch 'develop' into update-adiak-python
michaelmckinsey1 fbb2931
Add new release and use in python variant
michaelmckinsey1 f53c8d3
Add conflicts clause
michaelmckinsey1 54b25c6
Merge branch 'develop' into update-adiak-python
michaelmckinsey1 9ba1a34
Undo clause
michaelmckinsey1 2902870
Update package.py
michaelmckinsey1 7aa2b98
lint
michaelmckinsey1 2437e69
Merge branch 'develop' into update-adiak-python
michaelmckinsey1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -2,6 +2,8 @@ | |
| # | ||
| # SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
|
||
| import os | ||
|
|
||
| from spack_repo.builtin.build_systems.cmake import CMakePackage | ||
|
|
||
| from spack.package import * | ||
|
|
@@ -19,12 +21,15 @@ class Adiak(CMakePackage): | |
|
|
||
| variant("mpi", default=True, description="Build with MPI support") | ||
| variant("shared", default=True, description="Build dynamic libraries") | ||
| variant("python", default=False, when="@0.5.0:", description="Build Python bindings") | ||
|
|
||
| license("MIT") | ||
|
|
||
| version("master", branch="master") | ||
| version( | ||
| "0.4.1", commit="7ac997111785bee6d9391664b1d18ebc2b3c557b", submodules=True, preferred=True | ||
| "0.5.0", commit="f08c8375c613e13e9b9c6a1db271cbf8f0d3f3e3", submodules=True, preferred=True | ||
| ) | ||
| version("0.4.1", commit="7ac997111785bee6d9391664b1d18ebc2b3c557b", submodules=True) | ||
| version("0.4.0", commit="7e8b7233f8a148b402128ed46b2f0c643e3b397e", submodules=True) | ||
| version("0.2.2", commit="3aedd494c81c01df1183af28bc09bade2fabfcd3", submodules=True) | ||
| version("0.2.1", commit="950e3bfb91519ecb7b7ee7fa3063bfab23c0e2c9", submodules=True) | ||
|
|
@@ -36,6 +41,9 @@ class Adiak(CMakePackage): | |
|
|
||
| depends_on("mpi", when="+mpi") | ||
|
|
||
| depends_on("python@3", when="+python", type=("build", "link", "run")) | ||
| depends_on("[email protected]:", when="+python", type=("build", "link", "run")) | ||
|
|
||
| def cmake_args(self): | ||
| args = [] | ||
| if self.spec.satisfies("+mpi"): | ||
|
|
@@ -50,5 +58,17 @@ def cmake_args(self): | |
| else: | ||
| args.append("-DBUILD_SHARED_LIBS=OFF") | ||
|
|
||
| if self.spec.satisfies("+python"): | ||
| args.append("-DENABLE_PYTHON_BINDINGS=ON") | ||
| pybind11_cmake = os.path.join( | ||
| self.spec["py-pybind11"].prefix, "pybind11", "share", "cmake", "pybind11" | ||
| ) | ||
| args.append(f"-Dpybind11_DIR={pybind11_cmake}") | ||
|
|
||
| args.append("-DENABLE_TESTS=OFF") | ||
| return args | ||
|
|
||
| def setup_run_environment(self, env): | ||
| if self.spec.satisfies("+python"): | ||
| env.prepend_path("PYTHONPATH", self.spec.prefix.join(python_platlib)) | ||
| env.prepend_path("PYTHONPATH", self.spec.prefix.join(python_purelib)) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.