tools: patman: fix `pip install` with Python 3.12
PATCH 1/1 tools: patman: fix `pip install` with Python 3.12
Installing patman with cd ./tools/patman && pip install -e . fails with the error below.
As described in the error output, the license line is not allowed to be only defined in the setup.py.
Quoted 22 lines
$ cd ./tools/patman && pip install -e . Obtaining file:///.../u-boot/tools/patman Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... error error: subprocess-exited-with-error× Getting requirements to build editable did not run successfully.
│ exit code: 1 ╰─> [61 lines of output]
/tmp/pip-build-env-mqjvnmz8/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:76:
_MissingDynamic:licensedefined outside ofpyproject.tomlis ignored.
!!********************************************************************************
The following seems to be defined outside ofpyproject.toml:
license = 'GPL-2.0+'According to the spec (see the link below), however, setuptools CANNOT consider this value unless
licenseis listed asdynamic.
Quoted 8 lines
To prevent this problem, you can list
licenseunderdynamicor alternatively remove the[project]table from your file and rely entirely on other means of configuration.
********************************************************************************!!
--- tools/patman/pyproject.toml | 1 + 1 file changed, 1 insertion(+)
tools/patman/pyproject.toml +1 -0
@@ -17,6 +17,7 @@ classifiers = [ "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", "Operating System :: OS Independent", ] +dynamic = ["license"] [project.urls] "Homepage" = "https://docs.u-boot.org/en/latest/develop/patman.html"
Signature · 1 line
2.45.1
Quoted 36 lines · Brandon Maier
Installing patman with
cd ./tools/patman && pip install -e .fails with the error below.As described in the error output, the license line is not allowed to be only defined in the
setup.py.Quoted 29 lines
$ cd ./tools/patman && pip install -e . Obtaining file:///.../u-boot/tools/patman Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... error error: subprocess-exited-with-error× Getting requirements to build editable did not run successfully.
│ exit code: 1 ╰─> [61 lines of output]
/tmp/pip-build-env-mqjvnmz8/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:76:
_MissingDynamic:licensedefined outside ofpyproject.tomlis ignored.
!!********************************************************************************
The following seems to be defined outside ofpyproject.toml:
license = 'GPL-2.0+'According to the spec (see the link below), however, setuptools CANNOT consider this value unless
licenseis listed asdynamic.To prevent this problem, you can list
licenseunderdynamicor alternatively remove the[project]table from your file and rely entirely on other means of configuration.
********************************************************************************
Quoted 7 lines
Quoted 1 line
!!Signed-off-by Brandon Maier <[email protected]>CC Simon Glass <[email protected]>--- tools/patman/pyproject.toml | 1 + 1 file changed, 1 insertion(+)
Hi Brandon,
Quoted 40 lines · Simon Glass
Quoted 38 lines · Brandon Maier
Installing patman with
cd ./tools/patman && pip install -e .fails with the error below.As described in the error output, the license line is not allowed to be only defined in the
setup.py.Quoted 30 lines
$ cd ./tools/patman && pip install -e . Obtaining file:///.../u-boot/tools/patman Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... error error: subprocess-exited-with-error× Getting requirements to build editable did not run successfully.
│ exit code: 1 ╰─> [61 lines of output]
/tmp/pip-build-env-mqjvnmz8/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:76:
_MissingDynamic:licensedefined outside ofpyproject.tomlis ignored.
!!********************************************************************************
The following seems to be defined outside ofpyproject.toml:
license = 'GPL-2.0+'According to the spec (see the link below), however, setuptools CANNOT consider this value unless
licenseis listed asdynamic.To prevent this problem, you can list
licenseunderdynamicor alternatively remove the[project]table from your file and rely entirely on other means of configuration.
********************************************************************************!!
Quoted 7 lines
Quoted 5 lines
Signed-off-by Brandon Maier <[email protected]>CC Simon Glass <[email protected]>--- tools/patman/pyproject.toml | 1 + 1 file changed, 1 insertion(+)Reviewed-by Simon Glass <[email protected]>
Unfortunately this causes 'make pip' to fail. Can you please take a look?
Regards,
Simon
Hi Simon,
Quoted 49 lines · Simon Glass
Hi Brandon,
Quoted 46 lines · Simon Glass
Quoted 43 lines · Brandon Maier
Installing patman with
cd ./tools/patman && pip install -e .fails with the error below.As described in the error output, the license line is not allowed to be only defined in the
setup.py.Quoted 22 lines
$ cd ./tools/patman && pip install -e . Obtaining file:///.../u-boot/tools/patman Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... error error: subprocess-exited-with-error× Getting requirements to build editable did not run successfully.
│ exit code: 1 ╰─> [61 lines of output]
/tmp/pip-build-env-mqjvnmz8/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:76:
_MissingDynamic:licensedefined outside ofpyproject.tomlis ignored.
!!********************************************************************************
The following seems to be defined outside ofpyproject.toml:
license = 'GPL-2.0+'According to the spec (see the link below), however, setuptools CANNOT consider this value unless
licenseis listed asdynamic.Quoted 8 lines
To prevent this problem, you can list
licenseunderdynamicor alternatively remove the[project]table from your file and rely entirely on other means of configuration.
********************************************************************************!!
Signed-off-by Brandon Maier <[email protected]>CC Simon Glass <[email protected]>--- tools/patman/pyproject.toml | 1 + 1 file changed, 1 insertion(+)
Quoted 3 lines
Quoted 1 line
Reviewed-by Simon Glass <[email protected]>Unfortunately this causes 'make pip' to fail. Can you please take a look?
The make pip uses python -m build which seems to handle this differently.
I removed the license line from setup.py entirely, as the pyproject doc says it's not needed if a license classifier is used. That now works with both pip install and python -m build.
Thanks,
Brandon
Quoted 3 lines
Regards,
Simon