On 10.06.25 15:12, Quentin Schulz wrote:
Hi Heinrich,

On 6/10/25 1:17 PM, Heinrich Schuchardt wrote:
On 10.06.25 12:53, Quentin Schulz wrote:
Hi Heinrich,

On 6/7/25 1:32 PM, Heinrich Schuchardt wrote:
Setuptools 78.1.1 shows warnings:

* Pattern 'GPL' did not match any files.
* Pattern 'BSD-2-Clause' did not match any files.
* SetuptoolsDeprecationWarning: License classifiers are deprecated.

Cf. https://eur02.safelinks.protection.outlook.com/? url=https%3A%2F%2Fpackaging.python.org%2Fen%2Flatest%2Fguides%2Fwriting-pyproject-&data=05%7C02%7Cquentin.schulz%40cherry.de%7C0adb7b1dc0614f539d0808dda81061b4%7C5e0e1b5221b54e7b83bb514ec460677e%7C0%7C0%7C638851510506087467%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=EE9NsYjNmv9u%2FCkTUJlLaDtXouwZ2pNPlBwvLFuwQlA%3D&reserved=0 toml/#license

Signed-off-by: Heinrich Schuchardt <heinrich.schucha...@canonical.com>
---
  scripts/dtc/pylibfdt/setup.py | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/scripts/dtc/pylibfdt/setup.py b/scripts/dtc/pylibfdt/ setup.py
index c6fe5a6a446..487e669f524 100755
--- a/scripts/dtc/pylibfdt/setup.py
+++ b/scripts/dtc/pylibfdt/setup.py
@@ -158,12 +158,10 @@ setup(
      long_description_content_type="text/plain",
      url="https://eur02.safelinks.protection.outlook.com/? url=https%3A%2F%2Fgit.kernel.org%2Fpub%2Fscm%2Futils%2Fdtc%2Fdtc.git&data=05%7C02%7Cquentin.schulz%40cherry.de%7C0adb7b1dc0614f539d0808dda81061b4%7C5e0e1b5221b54e7b83bb514ec460677e%7C0%7C0%7C638851510506108720%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=r00cvV5e%2BYJO6je%2FyIip3lMC%2FjqkUpTKvC%2FpMS9aobU%3D&reserved=0",
      license="BSD",
-    license_files=["GPL", "BSD-2-Clause"],
+    license_files=["Licenses/gpl-2.0.txt", "Licenses/bsd-2- clause.txt"],
      classifiers=[
          "Programming Language :: Python :: 3",
-        "License :: OSI Approved :: BSD License",
-        "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",

This is an issue though, as it's supposed to be replaced by the license argument to the setuptools.setup() function and we aren't matching there (though tbf, we weren't already matching :) ).

Upstream setup tools has been changed to ignore these lines.


Also, I'm not entirely sure BSD is unambiguous?

There are BSD Zero Clause License, BSD 1-Clause License, BSD-2-Clause, and BSD-3-Clause, and further variants. See

https://eur02.safelinks.protection.outlook.com/? url=https%3A%2F%2Fspdx.org%2Flicenses%2F&data=05%7C02%7Cquentin.schulz%40cherry.de%7C0adb7b1dc0614f539d0808dda81061b4%7C5e0e1b5221b54e7b83bb514ec460677e%7C0%7C0%7C638851510506121987%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=INVUJ5iYA8APRyK0u9Rh2QUYLR%2B%2F0%2FGwevzMVHxgPiM%3D&reserved=0

The linked files in license_files are unambiguous.


I would suggest:

license="GPL-2.0-or-later OR BSD-2-Clause"

to match the SPDX-License-Identifier at the top if the setup.py file :)

51ec8db23280 ("pylibfdt: correct license information") is already merged. Please, send a new patch id you want to change the license field.


Fair enough, sending a patch...

I did a similar changes in an unrelated project a while ago, c.f. https://github.com/maxpat78/FATtools/pull/20/ commits/6f811b1a6719e605d8c6fb03d1e95468fa2de720

It seems like we need to make sure setuptools is 77.0.3 or later now. I don't see a declared dependency there though and it seems we add the path to the pylibfdt to the sys.path wherever we need it. I assume we would need to bump that version in those projects' pyproject.toml/ requirements.txt?

Should we just ignore this for the moment? At the same time, setuptools 77.0.3 is very recent, most distros don't actually package it just yet. If I trust my old self, if we build those tools within virtualenv/venv, then it would anyway just pick the latest available version on PyPi?

Thanks for looking at this in depth.

These are our requirements currently:

tools/binman/pyproject.toml:2:requires = ["setuptools>=61.0"]
tools/buildman/pyproject.toml:2:requires = ["setuptools>=61.0"]
tools/dtoc/pyproject.toml:2:requires = ["setuptools>=61.0"]
tools/patman/pyproject.toml:2:requires = ["setuptools>=61.0"]
tools/patman/requirements.txt:5:setuptools==75.8.0
tools/u_boot_pylib/pyproject.toml:2:requires = ["setuptools>=61.0"]

I did not see any issue in our CI. We don't install the Ubuntu Jammy default setuptools (59.6.0-1.2ubuntu0.22.04.3) in our Docker image.

Best regards

Heinrich

Reply via email to