GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove pkg_resources by kafitzgerald · Pull Request #281 · NCAR/wrf-python

Conversation

@kafitzgerald

@kafitzgerald kafitzgerald commented Jul 17, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Removes deprecated pkg_resources.

This shouldn't cause any problems for the Linux or macOS builds since it was originally used as a workaround for some Windows specific issues tied to np.distutils. And we no longer rely upon distutils so in theory removing this shouldn't be an issue there either. Unfortunately, we don't have testing for Windows, but we also aren't releasing Windows builds at the moment either.

I'll make sure we have an issue open for Windows testing / releases, but I'm inclined to get this merged without that and hopefully prioritize that soon.

Closes #280

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
kafitzgerald added 2 commits July 17, 2025 10:18
@kafitzgerald
remove deprecated use of pkg_resources
b9dbdd3
@kafitzgerald
remove import as well
4c2e356
@kafitzgerald
kafitzgerald requested a review from erogluorhan July 17, 2025 19:37
erogluorhan
erogluorhan approved these changes Jul 18, 2025
View reviewed changes

@erogluorhan erogluorhan left a comment

Copy link
Copy Markdown
Collaborator

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.

Sounds good to me; thanks for doing this!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kafitzgerald
kafitzgerald merged commit cef7105 into NCAR:develop Jul 18, 2025
@kafitzgerald
kafitzgerald deleted the rm_pkg_resources branch July 18, 2025 23:05
@kafitzgerald kafitzgerald mentioned this pull request Sep 3, 2025
Setuptools warning in 1.4.0 #287
Closed
DWesl
DWesl reviewed Sep 17, 2025
View reviewed changes
Comment thread src/wrf/__init__.py
Comment on lines -12 to -14
req = pkg_resources.Requirement.parse("wrf-python")
extra_dll_dir = pkg_resources.resource_filename(req,
"wrf-python/.libs")

@DWesl DWesl Sep 17, 2025

Copy link
Copy Markdown
Contributor

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.

I think the updated version of this is importlib.resources.path("wrf", ".libs"), which seems to have been added in 3.7. mesonbuild/meson-python#700 includes discussion on a similar topic. This comment and the followup have suggestions, and also say that I should run into any problems in my default development environment, which simplifies checks.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@DWesl DWesl Sep 18, 2025

Copy link
Copy Markdown
Contributor

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.

A guess based on the directory name (and Python doing its own search for imported extension modules) is that this is for the Fortran and OpenMP runtimes, which would be stored there by Windows wheel-packaging machinery, which was your guess. Since I build and install on the same system, I don't need to package those libraries, nor ensure they are on the path.

If you decide conda is the recommended binary distribution system on Windows, that should be irrelevant.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@erogluorhan erogluorhan erogluorhan approved these changes
+1 more reviewer
@DWesl DWesl DWesl left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Remove deprecated use of pkg_resources

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@kafitzgerald @DWesl @erogluorhan
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.