Skip to content
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

Introduce the bufr_query library from NOAA-EMC #461

Merged
merged 11 commits into from
Aug 21, 2024

Conversation

srherbener
Copy link
Collaborator

@srherbener srherbener commented Aug 14, 2024

This PR adds in a new package.py script for the new bufr_query library from NOAA-EMC. This is being used by JEDI and other applications.

This partially addresses JCSDA/spack-stack/issues/1182


# Optional dependencies
variant("python", default=True, description="Enable Python interface")
depends_on("python@3:", type=("build", "run"), when="+python")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that the correct syntax for Python is something like extends(python) and then use the PythonBuilder to build and install the Python interface. See https://github.com/spack/spack/pull/45504/files for how this is done. I haven't implemented a package this way myself yet, but I understand that this is how it is supposed to be.

At the minimum, please remove @3: because the minimum version that spack supports is 3.7.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I grabbed this from another package script too. The example you give looks a lot nicer. I can take a look at that. Thanks!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I switched the code over to use the extend("python") mechanism (as is done in the example PR you noted).

Copy link
Collaborator

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

Great that you got this to work so quickly. I haven't tested this myself, but I am happy to approve if this works for you.

@srherbener
Copy link
Collaborator Author

Tested this and verified that the bufr_query install is working. This is good to go now.

I solved the PYTHONPATH issue with a patch, and at the same time I've submitted a PR to bufr-query with the changes in the patch.

@srherbener srherbener requested a review from eap August 21, 2024 17:16
Copy link
Collaborator

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

Approving again. Looks good to me

@climbfuji
Copy link
Collaborator

The commit history is a bit too long for merging this as a regular merge commit (which we usually do for merges into the spack submodule for easier cherry-picking for upstream spack develop). I am going to merge this as a squash merge and we'll have to do something like git checkout jcsda/spack-stack-dev -- var/spack/repos/builtin/packages/bufr_query to simply grab the whole directory and push it upstream to spack develop.

@climbfuji climbfuji merged commit ebc6610 into JCSDA:spack-stack-dev Aug 21, 2024
15 checks passed
@srherbener srherbener deleted the feature/intro-bufr-query branch August 22, 2024 19:24
srherbener added a commit to srherbener/spack that referenced this pull request Aug 22, 2024
This PR adds in a new package.py script for the new bufr_query library from NOAA-EMC. This is being used by JEDI and other applications.
@srherbener
Copy link
Collaborator Author

I have created a PR in the authoritative spack repo with these changes: spack#45920

uturuncoglu pushed a commit to uturuncoglu/spack that referenced this pull request Oct 8, 2024
* Introduce the bufr_query library from NOAA-EMC (JCSDA#461)

This PR adds in a new package.py script for the new bufr_query library from NOAA-EMC. This is being used by JEDI and other applications.

* Add explicit build dependency spec to the pybind11 depends_on spec

Co-authored-by: Wouter Deconinck <[email protected]>

* Convert patch file to the URL form which pulls the changes from github.

Co-authored-by: Wouter Deconinck <[email protected]>

* Added new version (0.0.3) and removed obsolete site-packages.patch file

---------

Co-authored-by: Wouter Deconinck <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INFRA JEDI Infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants