From 6f811b1a6719e605d8c6fb03d1e95468fa2de720 Mon Sep 17 00:00:00 2001 From: Quentin Schulz Date: Tue, 29 Apr 2025 13:12:28 +0200 Subject: [PATCH 1/2] pyproject.toml: migrate to PEP-639 The license field in PEP-639 is now an SPDX license expression.[1] Note that while the gpl.txt license file text is the one of the GPL-3.0-or-later, FATtools/__init__.py and FATtools/NTFS/__init__.py (the only two files with a mention of GPL) only mention "GPLv3" meaning GPL-3.0-only is expected, otherwise "GPLv3+" or "or later" or "or any later version" should have been written. I'm not a lawyer but that is my understanding of the license. Because `python -m build` (used in GitHub workflow) creates a venv with the requirements, it'll build with a recent setuptools. However, to make sure it builds with a recent enough setuptools, hardcode the minimum version that supports PEP-639: 77.0.3.[2] Finally, following the recommendations of the setuptools project itself[3], let's remove the "License ::" classifier. [1] https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license [2] https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#id9 [3] https://packaging.python.org/en/latest/guides/licensing-examples-and-user-scenarios/#basic-example Signed-off-by: Quentin Schulz --- pyproject.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9909225..1b0cba1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools"] +requires = ["setuptools >= 77.0.3"] build-backend = "setuptools.build_meta" [project] @@ -11,14 +11,13 @@ description = "Pure python tools for accessing FAT filesystem images and disks" readme = "README.MD" requires-python = ">=3.5" keywords = ["FAT", "disk","image"] -license = {text = "GPL"} +license = "GPL-3.0-only" classifiers = [ 'Programming Language :: Python :: 3', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Environment :: Win32 (MS Windows)', 'Environment :: MacOS X', - 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX :: Linux', 'Operating System :: MacOS :: MacOS X', From 77bf0a41afd7231f371f4c1b2c4bca2c69fe6b4c Mon Sep 17 00:00:00 2001 From: Quentin Schulz Date: Tue, 29 Apr 2025 13:24:07 +0200 Subject: [PATCH 2/2] pyproject.toml: ship GPL license text It is usually expected from open-source software to ship the license with the code. Build systems like the Yocto Project expects some license files to be provided to be able to monitor changes to licenses used by the project it's building. My understanding is that the GPL-3.0-or-later requires you to provide the license text with verbatim source code (which would be the sdist package uploaded to PYPI I believe), c.f. 4. Conveying Verbatim Copies: You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and [...] give all recipients a copy of this License along with the Program. Let's add the GPL license text to the python package. Signed-off-by: Quentin Schulz --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 1b0cba1..e5da924 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,6 +12,7 @@ readme = "README.MD" requires-python = ">=3.5" keywords = ["FAT", "disk","image"] license = "GPL-3.0-only" +license-files = ["gpl.txt"] classifiers = [ 'Programming Language :: Python :: 3', 'Intended Audience :: Developers',