Add +python variant to esmf#45504
Conversation
jedwards4b
left a comment
There was a problem hiding this comment.
Thanks for adding this.
billsacks
left a comment
There was a problem hiding this comment.
Thanks for adding this! I'm not very familiar with spack builds, but I have one question (in a line comment) based on my knowledge of ESMPy.
billsacks
left a comment
There was a problem hiding this comment.
Thanks for the addition of numpy, and thanks again for your work on this!
|
@Chrismarsh What was the reason for closing the PR? A python variant for ESMF still seems like a good idea, and it should probably contain a dependency on |
|
@climbfuji I have no idea. I think I thought this branch had got merged in 🫠 sorry about that |
|
@climbfuji w.r.t
the python code doesn't depend though, does it? Or are you saying the ESMF package.py is missing the dependency and variant for yaml? |
|
@Chrismarsh I spoke too fast. The py-pyyaml dependency is introduced with esmx (esmf-8.4.0). I am currently checking if esmx is an optional component or if it is always enabled since 8.4.0. |
|
Looks like esmx is always built since 8.4.0. I'll create a separate PR to add that missing dependency. |
|
See #45700 |
|
I have apparently broken this rebase onto develop. Stand by one |
b190634 to
628130f
Compare
|
@spackbot fix labels |
|
@Chrismarsh Feel free to also pull in the changes in my esmf PR #45700 and I'll close it in favor of your's. |
climbfuji
left a comment
There was a problem hiding this comment.
I tested this PR prior to today's update from spack develop (I pulled in my python depencies, too, which are now also part of this PR). [email protected] built fine and I could import esmpy in python:
dom@blackpearl:~ [gcc-13]> python3
Python 3.10.13 (main, Aug 16 2024, 09:30:24) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import esmpy
/home/dom/work/spack-stack-test-esmf-python/envs/esmfpy-gcc-13.3.0/install/gcc/13.3.0/esmf-8.7.0b11-ai4z6vy/lib/python3.10/site-packages/esmpy/interface/loadESMF.py:94: VersionWarning: ESMF installation version 8.7.0 beta snapshot, ESMPy version 8.7.0b11
warnings.warn("ESMF installation version {}, ESMPy version {}".format(
Thanks for this update, @Chrismarsh !
|
I had to revise the patch regex for the older versions. This works for me on |
Testing now. The rebase was unfortunate. I need to cherry-pick the commits so that I can pull them into our fork. Never mind, I'll work around it. Maybe next time try |
Works for me with 8.7.0b11. |
|
Thanks for checking. Sorry about the rebase, not quite sure where that went wrong |
* Add `+python` variant * `esmf` package installs Python bindings when `+python` is set Note: this does not inherit `PythonPackage`, which force an either/or choice between the Makefile and Pip builder: it instantiates a `PythonPipBuilder` as needed (when `+python` is set).
* Add `+python` variant * `esmf` package installs Python bindings when `+python` is set Note: this does not inherit `PythonPackage`, which force an either/or choice between the Makefile and Pip builder: it instantiates a `PythonPipBuilder` as needed (when `+python` is set).
* Add `+python` variant * `esmf` package installs Python bindings when `+python` is set Note: this does not inherit `PythonPackage`, which force an either/or choice between the Makefile and Pip builder: it instantiates a `PythonPipBuilder` as needed (when `+python` is set).
ESMF has python bindings which are currently missing from the spack ESMF package. This PR adds a
+pythonvariant that installs these bindings./cc:
@AlexanderRichert-NOAA @climbfuji @jedwards4b @theurich @uturuncoglu