Skip to content

BLD: use more modern way to specify license metadata - #31560

Merged
adrinjalali merged 2 commits into
scikit-learn:mainfrom
rrricharrrd:build/30766-license-metadata
Jun 18, 2025
Merged

adrinjalali merged 2 commits into
scikit-learn:mainfrom
rrricharrrd:build/30766-license-metadata

Conversation

@rrricharrrd

@rrricharrrd rrricharrrd commented Jun 16, 2025 •

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Closes #30766

What does this implement/fix? Explain your changes.

Updates means of specifying LICENSE. See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license-and-license-files

Any other comments?

N/A

@betatim @glemaitre

@github-actions

github-actions Bot commented Jun 16, 2025 •

Copy link
Copy Markdown

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: ac431ca. Link to the linter CI: here

@rrricharrrd

Copy link
Copy Markdown
Contributor Author

Looking at the failing CI test, I see at https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=77349&view=logs&jobId=85dc54f1-b746-54c6-aaa8-29d3ad6201c9&j=85dc54f1-b746-54c6-aaa8-29d3ad6201c9&t=5f5d7705-2bc0-5dba-fcc6-e1cf6a70293a

Starting: Select python version to run CI python scripts
==============================================================================
Task         : Use Python version
Description  : Use the specified version of Python from the tool cache, optionally adding it to the PATH
Version      : 0.248.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/tool/use-python-version
==============================================================================
Found tool in cache: Python 3.9.23 x64
Finishing: Select python version to run CI python scripts

but here https://scikit-learn.org/stable/install.html it says that 1.7 requires Python 3.10 or later

not sure if this is related to my CI issue though...

@betatim

betatim commented Jun 17, 2025

Copy link
Copy Markdown
Member

I think the python version reported in the step that you linked to is a red herring. In our CI we always (I think) setup a conda environment in which all the work is done. So the python version shown in the CI step is more like the "system Python", not what is actually used. For example for this job the conda environment is based on https://github.com/scikit-learn/scikit-learn/blob/main/build_tools/azure/pymin_conda_forge_openblas_min_dependencies_environment.yml which specifies python 3.10

I wonder if the explanation for why this job fails and the others dont is the version of meson-python (0.16 for the minimum deps job, 0.18 in pymin_conda_forge_openblas_ubuntu_2204). Have you tried locally with meson-python 0.16? And/or is there something about this "new" style of specifying metadata in the meson-python change log?

If we can confirm it is due to meson-python, I would then summon @lesteve to see if we can bump the version up or not.

@rrricharrrd

Copy link
Copy Markdown
Contributor Author

@betatim I've tried locally with different meson-python versions, and that seems to be the issue:

For 0.18.0, 0.17.1, installation succeeds; for 0.17.0, 0.16.0 it doesn't. Can't figure out from changelog a likely reason for why, though: https://mesonbuild.com/meson-python/changelog.html

Show-versions output:

System:
    python: 3.11.11 (main, Dec 10 2024, 14:15:35) [Clang 16.0.0 (clang-1600.0.26.4)]
executable: /Users/richard/.pyenv/versions/sklearn/bin/python
   machine: macOS-14.7.6-x86_64-i386-64bit

Python dependencies:
      sklearn: 1.8.dev0
          pip: 24.0
   setuptools: 65.5.0
        numpy: 1.26.4
        scipy: 1.15.3
       Cython: 3.1.2
       pandas: None
   matplotlib: None
       joblib: 1.5.1
threadpoolctl: 3.6.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
    num_threads: 2
         prefix: libopenblas
       filepath: /Users/richard/.pyenv/versions/3.11.11/envs/sklearn/lib/python3.11/site-packages/numpy/.dylibs/libopenblas64_.0.dylib
        version: 0.3.23.dev
threading_layer: pthreads
   architecture: Haswell

       user_api: openmp
   internal_api: openmp
    num_threads: 4
         prefix: libomp
       filepath: /usr/local/Cellar/libomp/20.1.7/lib/libomp.dylib
        version: None

@betatim

betatim commented Jun 17, 2025 •

Copy link
Copy Markdown
Member

Let's go ahead and bump up the minimum version in

"meson-python": ("0.16.0", "build"),
then. I'd go for 0.17.1

After updating the minimum version in that file you'll have to regenerate the lockfiles with build_tools/update_environments_and_lock_files.py

@betatim betatim left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

I don't think we need a changelog entry for this

@betatim betatim added Quick Review For PRs that are quick to review Waiting for Second Reviewer First reviewer is done, need a second one! labels Jun 18, 2025
@lesteve

lesteve commented Jun 19, 2025 •

Copy link
Copy Markdown
Member

This looks like this PR broke the wheel build, see #31590 (comment) for more details.

@rrricharrrd

Copy link
Copy Markdown
Contributor Author

⚠️ CI failed on Wheel builder (last failure: Jun 23, 2025) ⚠️ #31590

Oh no, sorry about that! I assumed it would be okay because the CI was passing

jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jul 15, 2025
@jeremiedbb jeremiedbb mentioned this pull request Jul 15, 2025
13 tasks done
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jul 16, 2025
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jul 16, 2025
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jul 16, 2025
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Quick Review For PRs that are quick to review Waiting for Second Reviewer First reviewer is done, need a second one!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update project metadata to avoid using the deprecated way to declare the license.

4 participants