Skip to content

Conversation

@paddyroddy
Copy link
Contributor

@paddyroddy paddyroddy commented Jul 20, 2025

Rationale for this change

When building locally, I get many errors along the lines of

Please ensure the files specified are contained by the root
of the Python package (normally marked by `pyproject.toml`).

By 2026-Mar-20, you need to update your project and remove deprecated calls
or your builds will no longer be supported.

See https://packaging.python.org/en/latest/specifications/glob-patterns/ for details.
terminal demo

What changes are included in this PR?

  • Make the licence SPDX compliant
  • Remove the licence classifier
  • Move the licence files from setup.cfg to pyproject.toml
  • Fix the disallowed glob patterns via symlinks
  • Bumped the minimum version of setuptools due to macOS CI failures (don't know why this happened, caching maybe?)

I appreciate the symlink change might prove controversial. See discussions in #45867, fixes #45867.

Are these changes tested?

When I rebuild locally, I get no errors any more.

Are there any user-facing changes?

Yes. The minimum required version of setuptools is now 77. However, this is available on >=3.9 so won't affect anyone really.

@github-actions
Copy link

⚠️ GitHub issue #45867 has been automatically assigned in GitHub to PR creator.

@github-actions
Copy link

⚠️ GitHub issue #45867 has been automatically assigned in GitHub to PR creator.

# versions released after 2022
"setuptools_scm[toml]>=8",
"setuptools>=64",
"setuptools>=77",
Copy link
Member

Choose a reason for hiding this comment

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

This is required due to setuptools<77 not recognizing the new license strings proposed in this PR (see pypa/setuptools#4903 for explanation). I'm not sure if this is controversial so bringing it up here. @raulcd

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jul 20, 2025
@rok
Copy link
Member

rok commented Jul 20, 2025

@github-actions crossbow submit

@github-actions
Copy link

no tasks were provided for the job
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/16398862798

@raulcd
Copy link
Member

raulcd commented Jul 20, 2025

@github-actions crossbow submit -g python -g wheels

@github-actions
Copy link

Invalid group(s) {'wheels'}. Must be one of {'example-cpp', 'python', 'nightly-release', 'cpp', 'verify-rc-source-macos', 'wheel', 'test', 'verify-rc-source', 'cuda', 'vcpkg', 'linux-amd64', 'conan', 'r', 'nightly', 'ruby', 'linux', 'c-glib', 'linux-arm64', 'verify-rc-source-linux', 'example', 'packaging', 'integration', 'example-python', 'fuzz', 'nightly-tests', 'verify-rc', 'homebrew', 'nightly-packaging'}
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/16398880949

@raulcd
Copy link
Member

raulcd commented Jul 20, 2025

@github-actions crossbow submit -g python

@github-actions
Copy link

Revision: 6b1a08b

Submitted crossbow builds: ursacomputing/crossbow @ actions-2fdf3226a1

Task Status
example-python-minimal-build-fedora-conda GitHub Actions
example-python-minimal-build-ubuntu-venv GitHub Actions
test-conda-python-3.10 GitHub Actions
test-conda-python-3.10-hdfs-2.9.2 GitHub Actions
test-conda-python-3.10-hdfs-3.2.1 GitHub Actions
test-conda-python-3.10-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11 GitHub Actions
test-conda-python-3.11-dask-latest GitHub Actions
test-conda-python-3.11-dask-upstream_devel GitHub Actions
test-conda-python-3.11-hypothesis GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-1.26 GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.11-pandas-upstream_devel-numpy-nightly GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
test-conda-python-3.12 GitHub Actions
test-conda-python-3.12-cpython-debug GitHub Actions
test-conda-python-3.13 GitHub Actions
test-conda-python-3.9 GitHub Actions
test-conda-python-3.9-pandas-1.1.3-numpy-1.19.5 GitHub Actions
test-conda-python-emscripten GitHub Actions
test-cuda-python-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-debian-12-python-3-amd64 GitHub Actions
test-debian-12-python-3-i386 GitHub Actions
test-fedora-42-python-3 GitHub Actions
test-ubuntu-22.04-python-3 GitHub Actions
test-ubuntu-22.04-python-313-freethreading GitHub Actions
test-ubuntu-24.04-python-3 GitHub Actions

Copy link
Member

Choose a reason for hiding this comment

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

Does symbolic link work on Windows...?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I guess there's no other way to fix it then other than copying or creating new licence and notice files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have copied over the files for the tests @rok

@kou
Copy link
Member

kou commented Jul 20, 2025

@github-actions crossbow submit -g wheel

@kou kou changed the title GH-45867: [PYTHON] Fix SetuptoolsDeprecationWarning GH-45867: [Python] Fix SetuptoolsDeprecationWarning Jul 20, 2025
@github-actions
Copy link

⚠️ GitHub issue #45867 has been automatically assigned in GitHub to PR creator.

@github-actions
Copy link

Revision: 6b1a08b

Submitted crossbow builds: ursacomputing/crossbow @ actions-fe79dfe84b

Task Status
python-sdist GitHub Actions
wheel-macos-monterey-cp310-cp310-amd64 GitHub Actions
wheel-macos-monterey-cp310-cp310-arm64 GitHub Actions
wheel-macos-monterey-cp311-cp311-amd64 GitHub Actions
wheel-macos-monterey-cp311-cp311-arm64 GitHub Actions
wheel-macos-monterey-cp312-cp312-amd64 GitHub Actions
wheel-macos-monterey-cp312-cp312-arm64 GitHub Actions
wheel-macos-monterey-cp313-cp313-amd64 GitHub Actions
wheel-macos-monterey-cp313-cp313-arm64 GitHub Actions
wheel-macos-monterey-cp313-cp313t-amd64 GitHub Actions
wheel-macos-monterey-cp313-cp313t-arm64 GitHub Actions
wheel-macos-monterey-cp39-cp39-amd64 GitHub Actions
wheel-macos-monterey-cp39-cp39-arm64 GitHub Actions
wheel-manylinux-2-28-cp310-cp310-amd64 GitHub Actions
wheel-manylinux-2-28-cp310-cp310-arm64 GitHub Actions
wheel-manylinux-2-28-cp311-cp311-amd64 GitHub Actions
wheel-manylinux-2-28-cp311-cp311-arm64 GitHub Actions
wheel-manylinux-2-28-cp312-cp312-amd64 GitHub Actions
wheel-manylinux-2-28-cp312-cp312-arm64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313-amd64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313-arm64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313t-amd64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313t-arm64 GitHub Actions
wheel-manylinux-2-28-cp39-cp39-amd64 GitHub Actions
wheel-manylinux-2-28-cp39-cp39-arm64 GitHub Actions
wheel-musllinux-1-2-cp310-cp310-amd64 GitHub Actions
wheel-musllinux-1-2-cp310-cp310-arm64 GitHub Actions
wheel-musllinux-1-2-cp311-cp311-amd64 GitHub Actions
wheel-musllinux-1-2-cp311-cp311-arm64 GitHub Actions
wheel-musllinux-1-2-cp312-cp312-amd64 GitHub Actions
wheel-musllinux-1-2-cp312-cp312-arm64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313-amd64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313-arm64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313t-amd64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313t-arm64 GitHub Actions
wheel-musllinux-1-2-cp39-cp39-amd64 GitHub Actions
wheel-musllinux-1-2-cp39-cp39-arm64 GitHub Actions
wheel-windows-cp310-cp310-amd64 GitHub Actions
wheel-windows-cp311-cp311-amd64 GitHub Actions
wheel-windows-cp312-cp312-amd64 GitHub Actions
wheel-windows-cp313-cp313-amd64 GitHub Actions
wheel-windows-cp313-cp313t-amd64 GitHub Actions
wheel-windows-cp39-cp39-amd64 GitHub Actions

@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jul 20, 2025
@rok
Copy link
Member

rok commented Jul 20, 2025

@github-actions crossbow submit -g wheel

@github-actions
Copy link

Revision: df371b1

Submitted crossbow builds: ursacomputing/crossbow @ actions-4d54dadfaa

Task Status
python-sdist GitHub Actions
wheel-macos-monterey-cp310-cp310-amd64 GitHub Actions
wheel-macos-monterey-cp310-cp310-arm64 GitHub Actions
wheel-macos-monterey-cp311-cp311-amd64 GitHub Actions
wheel-macos-monterey-cp311-cp311-arm64 GitHub Actions
wheel-macos-monterey-cp312-cp312-amd64 GitHub Actions
wheel-macos-monterey-cp312-cp312-arm64 GitHub Actions
wheel-macos-monterey-cp313-cp313-amd64 GitHub Actions
wheel-macos-monterey-cp313-cp313-arm64 GitHub Actions
wheel-macos-monterey-cp313-cp313t-amd64 GitHub Actions
wheel-macos-monterey-cp313-cp313t-arm64 GitHub Actions
wheel-macos-monterey-cp39-cp39-amd64 GitHub Actions
wheel-macos-monterey-cp39-cp39-arm64 GitHub Actions
wheel-manylinux-2-28-cp310-cp310-amd64 GitHub Actions
wheel-manylinux-2-28-cp310-cp310-arm64 GitHub Actions
wheel-manylinux-2-28-cp311-cp311-amd64 GitHub Actions
wheel-manylinux-2-28-cp311-cp311-arm64 GitHub Actions
wheel-manylinux-2-28-cp312-cp312-amd64 GitHub Actions
wheel-manylinux-2-28-cp312-cp312-arm64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313-amd64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313-arm64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313t-amd64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313t-arm64 GitHub Actions
wheel-manylinux-2-28-cp39-cp39-amd64 GitHub Actions
wheel-manylinux-2-28-cp39-cp39-arm64 GitHub Actions
wheel-musllinux-1-2-cp310-cp310-amd64 GitHub Actions
wheel-musllinux-1-2-cp310-cp310-arm64 GitHub Actions
wheel-musllinux-1-2-cp311-cp311-amd64 GitHub Actions
wheel-musllinux-1-2-cp311-cp311-arm64 GitHub Actions
wheel-musllinux-1-2-cp312-cp312-amd64 GitHub Actions
wheel-musllinux-1-2-cp312-cp312-arm64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313-amd64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313-arm64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313t-amd64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313t-arm64 GitHub Actions
wheel-musllinux-1-2-cp39-cp39-amd64 GitHub Actions
wheel-musllinux-1-2-cp39-cp39-arm64 GitHub Actions
wheel-windows-cp310-cp310-amd64 GitHub Actions
wheel-windows-cp311-cp311-amd64 GitHub Actions
wheel-windows-cp312-cp312-amd64 GitHub Actions
wheel-windows-cp313-cp313-amd64 GitHub Actions
wheel-windows-cp313-cp313t-amd64 GitHub Actions
wheel-windows-cp39-cp39-amd64 GitHub Actions

@martin-traverse
Copy link

As per #47551, the test seems to be expecting this:

license = {text = "Apache-2.0"}

@paddyroddy
Copy link
Contributor Author

As per #47551, the test seems to be expecting this:

license = {text = "Apache-2.0"}

I don't think it's this. Those tests are passing, mine is failing on the AMD64 Conda Integration Test. @rok any idea?

@rok
Copy link
Member

rok commented Oct 1, 2025

@paddyroddy as per @raulcd there was a go failure (#47673) on master that was since fixed, so rebase should fix it.

@paddyroddy
Copy link
Contributor Author

@rok passing again now. Sorry, was away again but actually back now.

@pitrou
Copy link
Member

pitrou commented Oct 28, 2025

This essentially copies the license files from repo root to python, right? That's not a very good idea IMHO: we will now need to maintain two sets of identical files.

@pitrou
Copy link
Member

pitrou commented Oct 28, 2025

An alternative would be to copy those files automatically when sdist is run. Here is some inspiration from a quick Google search:
https://github.com/pybind/pybind11/blob/3b30b0a51e48a3273918f30dfb222db604cea5e9/setup.py#L63-L77

@rok
Copy link
Member

rok commented Oct 28, 2025

An alternative would be to copy those files automatically when sdist is run.

That seems like a good alternative to the proposed symlink solution.

@rok
Copy link
Member

rok commented Oct 30, 2025

An alternative would be to copy those files automatically when sdist is run.

@paddyroddy would you be interested in adding this here?

@paddyroddy
Copy link
Contributor Author

paddyroddy commented Oct 30, 2025

@paddyroddy would you be interested in adding this here?

Yes. Will try and find time tomorrow.

@paddyroddy
Copy link
Contributor Author

An alternative would be to copy those files automatically when sdist is run. Here is some inspiration from a quick Google search: pybind/pybind11@3b30b0a/setup.py#L63-L77

Isn't already covered by the MANIFEST?

include ../LICENSE.txt
include ../NOTICE.txt

I was copying the files here from a git point of view, but they should already be packaged

@rok
Copy link
Member

rok commented Nov 3, 2025

I was copying the files here from a git point of view, but they should already be packaged

I don't think they are packaged currently, see #47932 (comment).

If I understand correctly @pitrou is suggesting we copy them at wheel-build-time so they do get packaged, but are not duplicated in the repo.

@paddyroddy
Copy link
Contributor Author

I don't think they are packaged currently, see #47932 (comment).

Ah, so they are meant to be, but the current setup isn't working. Will look into the SDist thing.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI][Python] A new version (77.0.2) of setuptools seems to have broken some of our builds

6 participants