Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Drop setuptools-scm requirement in wheels#21820

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@QuLogic
Copy link
Member

PR Summary

Fixes#21783.

PR Checklist

Tests and Styling

  • [n/a] Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • [n/a] New features are documented, with examples if plot related.
  • [n/a] New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • [n/a] API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).
  • [n/a] Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).

@QuLogicQuLogic added this to thev3.5.1 milestoneNov 30, 2021
# Installing from a git checkout.
["setuptools_scm>=4"]ifPath(__file__).with_name(".git").exists()
else []
# Installing from a git checkout that is not producing a wheel.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why exactly is having this insetup_requires insufficient? Or is that only going to work withpyproject.toml?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I don't know; this came in with the original PR#18971; would have to ask@anntzer for the exact reason.

Copy link
Contributor

@anntzeranntzerDec 1, 2021
edited
Loading

Choose a reason for hiding this comment

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

See#18971 (comment) and#18971 (comment): the two options were either
(a) don't have a runtime dep on setuptools_scm, and accept that inplace installs get the wrong version if one doespip install -e . and then update the git repo (the version comes from_version.py and is only updated when setup.py is run, either directly (e.g. when recompiling) or via pip); or
(b) make setuptools_scm a dependency so that the version is always correct.

I was actually in favor of (a) (as described in that thread), but didn't feel that strongly about it. I guess that's another opportunity to go back to (a) :-)

Copy link
Member

Choose a reason for hiding this comment

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

accept that inplace installs get the wrong version if one does pip install -e .

Do you mean that the wrong version gets reported, or that the install doesn't work? I think reporting the current commit in the version is nice, but hardly crucial.

Copy link
Contributor

Choose a reason for hiding this comment

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

The wrong version gets reported if one doespip install -e and then updates the git repo (and even then, there are probably workarounds possible e.g. using git hooks...).

jklymak reacted with thumbs up emoji
Copy link
Contributor

Choose a reason for hiding this comment

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

As noted in#21783, my solution has been to import and use setuptools_scm, then fallback toimportlib_metadata. Given the fallback, it seemed fine to treatsetuptools_scm as an optional dependency and only list it as a "build" dependency. It's not perfect, but I've gone to statically listing all package metadata insetup.cfg.

@tacaswelltacaswell mentioned this pull requestDec 1, 2021
@tacaswell
Copy link
Member

I agree with@QuLogic that this is the minimal fix for the wheels and adopting something more like@dopplershift 's metpy example for 3.6

@QuLogic
Copy link
MemberAuthor

Here is a test build for wheels with this patch:
https://github.com/QuLogic/matplotlib/actions/runs/1523259905
I believe there is no longer a setuptools-scm requirement.

@tacaswell
Copy link
Member

I also checked by hand locally with the right env set and did not have the dependency.

Copy link
Contributor

@dopplershiftdopplershift left a comment

Choose a reason for hiding this comment

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

Fine enough for a bugfix release.

@tacaswelltacaswell merged commit59732ac intomatplotlib:mainDec 1, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestDec 1, 2021
@QuLogicQuLogic deleted the no-wheel-setuptools-scm branchDecember 1, 2021 22:23
QuLogic added a commit that referenced this pull requestDec 2, 2021
…820-on-v3.5.xBackport PR#21820 on branch v3.5.x (Drop setuptools-scm requirement in wheels)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@anntzeranntzeranntzer left review comments

@jklymakjklymakjklymak left review comments

@tacaswelltacaswelltacaswell approved these changes

@dopplershiftdopplershiftdopplershift approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

v3.5.1

Development

Successfully merging this pull request may close these issues.

[MNT]: wheel of 3.5.0 appears to depend on setuptools-scm which appears to be unintentional

6 participants

@QuLogic@tacaswell@dopplershift@anntzer@jklymak@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp