Skip to content

Add +python variant to esmf#45504

Merged
scheibelp merged 3 commits intospack:developfrom
Chrismarsh:package-fix/esmf
Aug 16, 2024
Merged

Add +python variant to esmf#45504
scheibelp merged 3 commits intospack:developfrom
Chrismarsh:package-fix/esmf

Conversation

@Chrismarsh
Copy link
Copy Markdown
Contributor

ESMF has python bindings which are currently missing from the spack ESMF package. This PR adds a +python variant that installs these bindings.

/cc:
@AlexanderRichert-NOAA @climbfuji @jedwards4b @theurich @uturuncoglu

@Chrismarsh Chrismarsh changed the title Add +python' variant to esmf` Add +python variant to esmf Jul 30, 2024
Copy link
Copy Markdown
Contributor

@jedwards4b jedwards4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this.

Copy link
Copy Markdown

@billsacks billsacks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

@billsacks billsacks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the addition of numpy, and thanks again for your work on this!

@Chrismarsh Chrismarsh closed this Aug 3, 2024
@Chrismarsh Chrismarsh deleted the package-fix/esmf branch August 3, 2024 04:24
@climbfuji
Copy link
Copy Markdown
Contributor

@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 py-pyyaml as well (since esmx depends on it).

@Chrismarsh Chrismarsh restored the package-fix/esmf branch August 12, 2024 20:12
@Chrismarsh Chrismarsh reopened this Aug 12, 2024
@Chrismarsh
Copy link
Copy Markdown
Contributor Author

@climbfuji I have no idea. I think I thought this branch had got merged in 🫠 sorry about that

@Chrismarsh
Copy link
Copy Markdown
Contributor Author

@climbfuji
Copy link
Copy Markdown
Contributor

@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.

@climbfuji
Copy link
Copy Markdown
Contributor

Looks like esmx is always built since 8.4.0. I'll create a separate PR to add that missing dependency.

https://github.com/esmf-org/esmf/blob/v8.4.0/makefile

@climbfuji
Copy link
Copy Markdown
Contributor

See #45700

@spackbot-app spackbot-app bot added stand-alone-tests Stand-alone (or smoke) tests for installed packages tests General test capability(ies) utilities vendored-dependencies versions virtual-dependencies workflow labels Aug 16, 2024
@Chrismarsh
Copy link
Copy Markdown
Contributor Author

I have apparently broken this rebase onto develop. Stand by one

@Chrismarsh
Copy link
Copy Markdown
Contributor Author

@spackbot fix labels

@climbfuji
Copy link
Copy Markdown
Contributor

@Chrismarsh Feel free to also pull in the changes in my esmf PR #45700 and I'll close it in favor of your's.

Copy link
Copy Markdown
Contributor

@climbfuji climbfuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 !

@climbfuji climbfuji requested a review from scheibelp August 16, 2024 16:33
@Chrismarsh
Copy link
Copy Markdown
Contributor Author

I had to revise the patch regex for the older versions. This works for me on @8.4.1:. @climbfuji can you triple check this changes works for you?

@climbfuji
Copy link
Copy Markdown
Contributor

I had to revise the patch regex for the older versions. This works for me on @8.4.1:. @climbfuji can you triple check this changes works for you?

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 git pull spack develop?

@climbfuji
Copy link
Copy Markdown
Contributor

I had to revise the patch regex for the older versions. This works for me on @8.4.1:. @climbfuji can you triple check this changes works for you?

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 git pull spack develop?

Works for me with 8.7.0b11.

@Chrismarsh
Copy link
Copy Markdown
Contributor Author

Thanks for checking. Sorry about the rebase, not quite sure where that went wrong

@scheibelp scheibelp self-assigned this Aug 16, 2024
@scheibelp scheibelp merged commit f0f9a16 into spack:develop Aug 16, 2024
@Chrismarsh Chrismarsh deleted the package-fix/esmf branch August 19, 2024 21:34
tldahlgren pushed a commit to AcriusWinter/spack that referenced this pull request Aug 20, 2024
* 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).
FrederickDeny pushed a commit to FrederickDeny/spack that referenced this pull request Aug 26, 2024
* 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).
climbfuji pushed a commit to climbfuji/spack that referenced this pull request Aug 29, 2024
* 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).
@Chrismarsh Chrismarsh mentioned this pull request Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants