-
Notifications
You must be signed in to change notification settings - Fork 0
Python Binding Packages #2
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
Draft
zachcran
wants to merge
24
commits into
master
Choose a base branch
from
python_packages
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 3 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
6cd2074
Current progress (see full commit message for details)
zachcran df0cc88
Add depends_on() 'when' kwarg to pluginplay
zachcran 6700810
Merge branch 'master' into python_packages
zachcran 40f4bff
Add dependency on numpy for the build tests to pass
zachcran 7111cea
prefix.lib64 does not properly get loaded in the PYTHONPATH
zachcran b233a11
python conditional depends_on statements; decouple python version
jwaldrop107 b443bcf
Require pybind >= 3.0
zachcran 6c0aa1f
various updates to packages
jwaldrop107 730cd19
add dependencies for FriendZone
jwaldrop107 8131721
remove reference to unused variant in NUX
jwaldrop107 b39493a
molssi dependencies
jwaldrop107 4d1305f
molssi patches
jwaldrop107 0f14c5c
FriendZone deps patch
jwaldrop107 055e8e3
FriendZone and NWX updates
jwaldrop107 221f997
Add base class for NWChemEx Python-only packages
zachcran e8656e2
Progress on switching friendzone and nwchemex packages to PythonPackage
zachcran 25cfac1
remove stale references to experimental features
jwaldrop107 f68ef5e
FriendZon and NWX updates; some cleaning on various packages
jwaldrop107 430e541
Python is default
jwaldrop107 611dfe0
update FriendZone
jwaldrop107 6af16e3
remove cxx standard from NWChemExBaseCXX
jwaldrop107 41ab705
dependency updates; checksum update for qcengine
jwaldrop107 184edc1
ChemCache: Add minimum version constraint to py-requests
zachcran d7258b7
Remove stale FriendZone version
jwaldrop107 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 |
|---|---|---|
|
|
@@ -74,6 +74,12 @@ def cmake_args(self): | |
| args.append(self.define("CMAKE_POLICY_DEFAULT_CMP0152", "NEW")) | ||
|
|
||
| # DEBUG REMOVE ME | ||
| args.append( | ||
| self.define( | ||
| "FETCHCONTENT_SOURCE_DIR_NWX_CMAKE", | ||
| "/home/zachcran/workspaces/nwchemex/repos_dev/nwxcmake", | ||
| ) | ||
| ) | ||
| args.append( | ||
| self.define( | ||
| "CMAKE_VERBOSE_MAKEFILE", | ||
|
|
@@ -87,39 +93,38 @@ def cmake_args(self): | |
| class NWChemExBasePybindings(NWChemExBaseCXX): | ||
|
|
||
| pkg.variant( | ||
| "pybindings", | ||
| "python", | ||
| default=False, | ||
| description="Build the Python bindings with Pybind11", | ||
| description="Build the Python bindings", | ||
| sticky=True, | ||
| ) | ||
|
|
||
| pkg.depends_on("py-pybind11", when="+pybindings") | ||
| # https://spack.readthedocs.io/en/latest/build_systems/pythonpackage.html#extends-vs-depends-on | ||
| pkg.extends("python", when="+python") | ||
| # TODO: decouple from python 3.13 | ||
| pkg.depends_on("[email protected]", when="+python") | ||
| pkg.depends_on("py-pybind11", when="+python") | ||
|
|
||
| def cmake_args(self): | ||
| args = super().cmake_args() | ||
|
|
||
| args.extend( | ||
| [ | ||
| self.define_from_variant( | ||
| "BUILD_PYBIND11_PYBINDINGS", "pybindings" | ||
| "BUILD_PYBIND11_PYBINDINGS", "python" | ||
| ), | ||
| self.define_from_variant("PYBIND11_FINDPYTHON", "pybindings"), | ||
| self.define_from_variant("PYBIND11_FINDPYTHON", "python"), | ||
| ] | ||
| ) | ||
|
|
||
| if self.spec.satisfies("+pybindings"): | ||
| if "NWX_MODULE_DIRECTORY" in os.environ: | ||
| args.append( | ||
| self.define( | ||
| "NWX_MODULE_DIRECTORY", | ||
| os.environ["NWX_MODULE_DIRECTORY"], | ||
| ) | ||
| if self.spec.satisfies("+python"): | ||
| args.append( | ||
| self.define( | ||
| "NWX_MODULE_DIRECTORY", | ||
| # lib64 is used for platlib from Python package | ||
| # TODO: Decouple this from Python 3.13 | ||
| self.prefix.lib64.join("python3.13").join("site-packages"), | ||
| ) | ||
| # TODO: Allow the user to configure this? | ||
| # args.append( | ||
| # "-DNWX_MODULE_DIRECTORY={}".format( | ||
| # self.prefix.lib.join(self.project.lower()).join("python") | ||
| # ) | ||
| # ) | ||
| ) | ||
|
|
||
| return args | ||
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This'll need to be removed. This comment is to increase visibility, since it's already called out in the comment above it.