pylibfdt: setup.py: Drop license_files
PATCH 1/1 pylibfdt: setup.py: Drop license_files
On more recent versions of setuptools the warning about not being able to find the files specified in license_files has re-appeared. This is because as best I can tell, it can't and won't look in $(srctree) but rather only subdirectories of scripts/dtc/pylibfdt. Since we already provide both SPDX tags and a license field with the SPDX contents, let us just drop license_files as it's not mandatory.
---
Cc: Heinrich Schuchardt <[email protected]>
Cc: Quentin Schulz <[email protected]>
Cc: Bryan Brattlof <[email protected]>
--- scripts/dtc/pylibfdt/setup.py | 1 - 1 file changed, 1 deletion(-)
scripts/dtc/pylibfdt/setup.py +0 -1
@@ -158,7 +158,6 @@ setup( long_description_content_type="text/plain", url="https://git.kernel.org/pub/scm/utils/dtc/dtc.git", license="GPL-2.0-or-later OR BSD-2-Clause", - license_files=["Licenses/gpl-2.0.txt", "Licenses/bsd-2-clause.txt"], classifiers=[ "Programming Language :: Python :: 3",
Signature · 1 line
2.43.0
Hi Tom,
Quoted 7 lines · Tom Rini
On more recent versions of setuptools the warning about not being able to find the files specified in
license_fileshas re-appeared. This is because as best I can tell, it can't and won't look in $(srctree) but rather only subdirectories ofscripts/dtc/pylibfdt. Since we already provide both SPDX tags and a license field with the SPDX contents, let us just droplicense_filesas it's not mandatory.
IANAL but I believe we need to ship the file, that's part of the license requirements for both GPL-2.0-or-later and BSD-2-Clause.
Can you try with a relative path, like ../../../ in front of Licenses?
If not enough, it's possible it's because it cannot read in parent directories? What if we have a symlink, does it copy the symlink or the target of the symlink?
Reading https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html, the license_files should then be automatically included in the sdist tarball, so the presence of the files in it shouldn't be an issue here.
Cheers,
Quentin
Quoted 11 lines · Quentin Schulz
Hi Tom,
Quoted 7 lines · Tom Rini
On more recent versions of setuptools the warning about not being able to find the files specified in
license_fileshas re-appeared. This is because as best I can tell, it can't and won't look in $(srctree) but rather only subdirectories ofscripts/dtc/pylibfdt. Since we already provide both SPDX tags and a license field with the SPDX contents, let us just droplicense_filesas it's not mandatory.
Quoted 2 lines
IANAL but I believe we need to ship the file, that's part of the license requirements for both GPL-2.0-or-later and BSD-2-Clause.
I mean, we who? As part of "we should re-examine how we bundle Python stuff", yes, I don't know if our pylibfdt stuff is at all optimal anymore and we should maybe we talking with upstream dtc more. But $(srctree)/Licenses/gpl-2.0.txt and $(srctree)/Licenses/bsd-2-clause.txt exist and we don't publish the python binaries.
Quoted 1 line
Can you try with a relative path, like ../../../ in front of Licenses?
Yes, and I also tried telling swig -I$(srctree) to no effect.
Quoted 3 lines
If not enough, it's possible it's because it cannot read in parent directories? What if we have a symlink, does it copy the symlink or the target of the symlink?
That would break on read-only source tree (Azure CI).
Quoted 3 lines
Reading https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html,
thelicense_filesshould then be automatically included in the sdist tarball, so the presence of the files in it shouldn't be an issue here.
We don't make sdist tarballs however.
Signature · 1 line
Tom
Hi Tom,
Quoted 15 lines · Tom Rini
Quoted 11 lines · Quentin Schulz
Hi Tom,
Quoted 7 lines · Tom Rini
On more recent versions of setuptools the warning about not being able to find the files specified in
license_fileshas re-appeared. This is because as best I can tell, it can't and won't look in $(srctree) but rather only subdirectories ofscripts/dtc/pylibfdt. Since we already provide both SPDX tags and a license field with the SPDX contents, let us just droplicense_filesas it's not mandatory.Quoted 2 lines
IANAL but I believe we need to ship the file, that's part of the license requirements for both GPL-2.0-or-later and BSD-2-Clause.
Quoted 7 lines
I mean, we who? As part of "we should re-examine how we bundle Python stuff", yes, I don't know if our pylibfdt stuff is at all optimal anymore and we should maybe we talking with upstream dtc more. But $(srctree)/Licenses/gpl-2.0.txt and $(srctree)/Licenses/bsd-2-clause.txt exist and we don't publish the python binaries.
Yeah I guess it's the last part that matters, as far as I understood from what you wrote, this means it's essentially only used locally and never uploaded anywhere for consumption by users, so I believe that would be fine.
I guess this patch is an ok stop-gap measure?
Cheers,
Quentin
Quoted 26 lines · Quentin Schulz
Hi Tom,
Quoted 15 lines · Tom Rini
Quoted 11 lines · Quentin Schulz
Hi Tom,
Quoted 7 lines · Tom Rini
On more recent versions of setuptools the warning about not being able to find the files specified in
license_fileshas re-appeared. This is because as best I can tell, it can't and won't look in $(srctree) but rather only subdirectories ofscripts/dtc/pylibfdt. Since we already provide both SPDX tags and a license field with the SPDX contents, let us just droplicense_filesas it's not mandatory.Quoted 2 lines
IANAL but I believe we need to ship the file, that's part of the license requirements for both GPL-2.0-or-later and BSD-2-Clause.
Quoted 7 lines
I mean, we who? As part of "we should re-examine how we bundle Python stuff", yes, I don't know if our pylibfdt stuff is at all optimal anymore and we should maybe we talking with upstream dtc more. But $(srctree)/Licenses/gpl-2.0.txt and $(srctree)/Licenses/bsd-2-clause.txt exist and we don't publish the python binaries.
Quoted 5 lines
Yeah I guess it's the last part that matters, as far as I understood from what you wrote, this means it's essentially only used locally and never uploaded anywhere for consumption by users, so I believe that would be fine.
I guess this patch is an ok stop-gap measure?
Well, until such future point as we try and handle libfdt/dtc stuff differently, maybe.
Signature · 1 line
Tom
Quoted 8 lines · Tom Rini
On more recent versions of setuptools the warning about not being able to find the files specified in
license_fileshas re-appeared. This is because as best I can tell, it can't and won't look in $(srctree) but rather only subdirectories ofscripts/dtc/pylibfdt. Since we already provide both SPDX tags and a license field with the SPDX contents, let us just droplicense_filesas it's not mandatory.[...]
Applied to u-boot/master, thanks!
[1/1] pylibfdt: setup.py: Drop license_files
commit: 123cd77122a13288e1552b5d9b7c22a6f19e2e02
Signature · 1 line
Tom