Skip to content
Draft
Show file tree
Hide file tree
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 Oct 7, 2025
df0cc88
Add depends_on() 'when' kwarg to pluginplay
zachcran Oct 7, 2025
6700810
Merge branch 'master' into python_packages
zachcran Oct 7, 2025
40f4bff
Add dependency on numpy for the build tests to pass
zachcran Oct 13, 2025
7111cea
prefix.lib64 does not properly get loaded in the PYTHONPATH
zachcran Oct 13, 2025
b233a11
python conditional depends_on statements; decouple python version
jwaldrop107 Oct 21, 2025
b443bcf
Require pybind >= 3.0
zachcran Oct 23, 2025
6c0aa1f
various updates to packages
jwaldrop107 Oct 23, 2025
730cd19
add dependencies for FriendZone
jwaldrop107 Oct 23, 2025
8131721
remove reference to unused variant in NUX
jwaldrop107 Oct 23, 2025
b39493a
molssi dependencies
jwaldrop107 Oct 28, 2025
4d1305f
molssi patches
jwaldrop107 Oct 28, 2025
0f14c5c
FriendZone deps patch
jwaldrop107 Oct 28, 2025
055e8e3
FriendZone and NWX updates
jwaldrop107 Oct 29, 2025
221f997
Add base class for NWChemEx Python-only packages
zachcran Nov 3, 2025
e8656e2
Progress on switching friendzone and nwchemex packages to PythonPackage
zachcran Nov 3, 2025
25cfac1
remove stale references to experimental features
jwaldrop107 Nov 4, 2025
f68ef5e
FriendZon and NWX updates; some cleaning on various packages
jwaldrop107 Nov 10, 2025
430e541
Python is default
jwaldrop107 Nov 12, 2025
611dfe0
update FriendZone
jwaldrop107 Nov 14, 2025
6af16e3
remove cxx standard from NWChemExBaseCXX
jwaldrop107 Nov 20, 2025
41ab705
dependency updates; checksum update for qcengine
jwaldrop107 Nov 21, 2025
184edc1
ChemCache: Add minimum version constraint to py-requests
zachcran Nov 24, 2025
d7258b7
Remove stale FriendZone version
jwaldrop107 Nov 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 23 additions & 18 deletions spack_repo/nwchemex/common/mixins/nwchemex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
)
Copy link
Member

@jwaldrop107 jwaldrop107 Oct 8, 2025

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.

args.append(
self.define(
"CMAKE_VERBOSE_MAKEFILE",
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
# ----------------------------------------------------------------------------

from spack import package as pkg

from spack_repo.nwchemex.common.mixins import NWChemExBasePybindings


Expand All @@ -48,7 +47,7 @@ class NwchemexChemcache(NWChemExBasePybindings):
pkg.maintainers("ryanmrichard", "jwaldrop107", "zachcran")
pkg.license("Apache-2.0", checked_by="zachcran")

pkg.version("generated_data", branch="generated_data")
pkg.version("generated_data", branch="generated_data", preferred=True)

# Versions from git tags
pkg.version(
Expand Down
4 changes: 2 additions & 2 deletions spack_repo/nwchemex/core/packages/nwchemex_chemist/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ class NwchemexChemist(NWChemExBasePybindings):

# First-party
pkg.depends_on("nwchemex-utilities")
pkg.depends_on("nwchemex-parallelzone")
pkg.depends_on("nwchemex-tensorwrapper")
pkg.depends_on("nwchemex-parallelzone", type=("build", "link", "run"))
pkg.depends_on("nwchemex-tensorwrapper", type=("build", "link", "run"))

# Although we have a variant, technically it is not a direct dependency
# of this package
Expand Down
12 changes: 11 additions & 1 deletion spack_repo/nwchemex/core/packages/nwchemex_pluginplay/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# ----------------------------------------------------------------------------

from spack import package as pkg

from spack_repo.nwchemex.common.mixins import NWChemExBasePybindings


Expand Down Expand Up @@ -63,7 +64,16 @@ class NwchemexPluginplay(NWChemExBasePybindings):
pkg.depends_on("rocksdb", when="+rocksdb")
# First-party
pkg.depends_on("nwchemex-utilities")
pkg.depends_on("nwchemex-parallelzone")
pkg.depends_on(
"nwchemex-parallelzone+python",
type=("build", "link", "run"),
when="+python",
)
pkg.depends_on(
"nwchemex-parallelzone~python",
type=("build", "link", "run"),
when="~python",
)

# Start with CMaize sanity check locations
sanity_check_is_dir = NWChemExBasePybindings.cmaize_sanity_check_dirs(
Expand Down
4 changes: 2 additions & 2 deletions spack_repo/nwchemex/core/packages/nwchemex_simde/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class NwchemexSimde(NWChemExBasePybindings):
)

# First-party
pkg.depends_on("nwchemex-chemist")
pkg.depends_on("nwchemex-pluginplay")
pkg.depends_on("nwchemex-chemist", type=("build", "link", "run"))
pkg.depends_on("nwchemex-pluginplay", type=("build", "link", "run"))

pkg.depends_on("sigma+eigen", when="+sigma")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,16 @@ class NwchemexTensorwrapper(NWChemExBasePybindings):

# First-party
pkg.depends_on("nwchemex-utilities")
pkg.depends_on("nwchemex-parallelzone")
pkg.depends_on(
"nwchemex-parallelzone~python",
type=("build", "link", "run"),
when="~python",
)
pkg.depends_on(
"nwchemex-parallelzone+python",
type=("build", "link", "run"),
when="+python",
)

pkg.depends_on("sigma+eigen", when="+sigma")

Expand Down