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

Make sure setuptools is compatible with PEP 639#10512

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

Open
DimitriPapadopoulos wants to merge1 commit intopydata:main
base:main
Choose a base branch
Loading
fromDimitriPapadopoulos:LICENSE

Conversation

DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulosDimitriPapadopoulos commentedJul 7, 2025
edited
Loading

Instead rely onproject.license inpyproject.toml.

Let's see if this fixes this CI error:

         /home/runner/work/xarray/xarray/asv_bench/.asv/env/155223cc45b660fb8d622bace3e087eb/lib/python3.11/site-packages/setuptools_scm/_integration/setuptools.py:92: UserWarning: version of None already set           warnings.warn(f"version of {dist_name} already set")         configuration error: `project.license` must be valid exactly by one definition (2 matches found):                - keys:                 'file': {type: string}               required: ['file']             - keys:                 'text': {type: string}               required: ['text']            DESCRIPTION:             `Project license <https://peps.python.org/pep-0621/#license>`_.            GIVEN VALUE:             "Apache-2.0"            OFFENDING RULE: 'oneOf'            DEFINITION:             {                 "oneOf": [                     {                         "properties": {                             "file": {                                 "type": "string",                                 "$$description": [                                     "Relative path to the file (UTF-8) which contains the license for the",                                     "project."                                 ]                             }                         },                         "required": [                             "file"                         ]                     },                     {                         "properties": {                             "text": {                                 "type": "string",                                 "$$description": [                                     "The license of the project whose meaning is that of the",                                     "`License field from the core metadata",                                     "<https://packaging.python.org/specifications/core-metadata/#license>`_."                                 ]                             }                         },                         "required": [                             "text"                         ]                     }                 ]             }
  • Closes #xxxx
  • Tests added
  • User visible changes (including notable bug fixes) are documented inwhats-new.rst
  • New functions/methods are listed inapi.rst

@DocOtak
Copy link
Contributor

DocOtak commentedJul 7, 2025
edited
Loading

I think this error is saying that the thing inproject.license needs to be an object, either:

{"text": "Apache-2.0"}

or

{"file": "LICENSE"}

which is a link to the file itself

@benbovy
Copy link
Member

@DimitriPapadopoulos
Copy link
ContributorAuthor

DimitriPapadopoulos commentedJul 8, 2025
edited
Loading

Right, requiringtext = orfile = means an old version of setuptools is being used. We needpypa/setuptools@fb161a2, which means seutptools ≥ 77.

However, if I understand you correctly, this is not compatible with Numpy 2.2:

"numpy": ["2.2"],

We'll probably have to partially revert#10300 and fall back to pre-PEP639 format. Wait, no, according to#10355 there's more to that.

I guess the real question is why I saw this issue surface recently in CI tests?

@DimitriPapadopoulosDimitriPapadopoulos changed the titleGet rid of LICENSE fileMake sure setuptools is compatible with PEP 939Jul 8, 2025
@DimitriPapadopoulosDimitriPapadopoulos changed the titleMake sure setuptools is compatible with PEP 939Make sure setuptools is compatible with PEP 639Jul 8, 2025
PEP 639 requires setuptools ≥ 77.It seems customary to require setuptools ≥ 77.0.2 which irons out somebugs related to PEP 639 support.
@DimitriPapadopoulosDimitriPapadopoulosforce-pushed theLICENSE branch 2 times, most recently from281ea27 to7defc56CompareJuly 8, 2025 05:54
@DimitriPapadopoulosDimitriPapadopoulos marked this pull request as ready for reviewJuly 8, 2025 05:55
@benbovy
Copy link
Member

I guess the real question is why I saw this issue surface recently in CI tests?

The error you mention above is from the asv benchmarks (only running CI after adding the corresponding label), for which Xarray is installed with--no-build-isolation. I tried to remove that flag in#10355 so a recent version of setutools can be picked without conflicting with numpy, but for some reason it didn't work.

@dcheriandcherian added run-benchmarkRun the ASV benchmark workflow and removed topic-documentation labelsJul 11, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
run-benchmarkRun the ASV benchmark workflow
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@DimitriPapadopoulos@DocOtak@benbovy@dcherian

[8]ページ先頭

©2009-2025 Movatter.jp