diff options
author | Tim Orling <ticotimo@gmail.com> | 2023-10-27 09:12:12 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-30 08:50:46 +0000 |
commit | 9ffac3fc3d8325e00654c349cf25119bb37e373b (patch) | |
tree | 8230fe7d32d9ef9cbc3dc145eb9d0fbd39646cb4 /scripts/lib/recipetool/create_buildsys_python.py | |
parent | 9b22a5aa8c81852ba0fca693ef0c9cb12d4ad4b5 (diff) | |
download | poky-9ffac3fc3d8325e00654c349cf25119bb37e373b.tar.gz |
recipetool: add python_hatchling support
One of the newer PEP-517 backends to be added was python_hatchling.bbclass
but it was not included in the recent improvements.
Add selftest for 'jsonschema' pypi package.
(From OE-Core rev: d99b4883b4fee82bc588fd235ba90fedf1550cb8)
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/recipetool/create_buildsys_python.py')
-rw-r--r-- | scripts/lib/recipetool/create_buildsys_python.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py index 9e7f22c0db..9312e4abf1 100644 --- a/scripts/lib/recipetool/create_buildsys_python.py +++ b/scripts/lib/recipetool/create_buildsys_python.py | |||
@@ -662,11 +662,12 @@ class PythonPyprojectTomlRecipeHandler(PythonRecipeHandler): | |||
662 | PEP517 https://peps.python.org/pep-0517/#source-trees | 662 | PEP517 https://peps.python.org/pep-0517/#source-trees |
663 | PEP518 https://peps.python.org/pep-0518/#build-system-table | 663 | PEP518 https://peps.python.org/pep-0518/#build-system-table |
664 | """ | 664 | """ |
665 | # bitbake currently support the 3 following backends | 665 | # bitbake currently supports the 4 following backends |
666 | build_backend_map = { | 666 | build_backend_map = { |
667 | "setuptools.build_meta": "python_setuptools_build_meta", | 667 | "setuptools.build_meta": "python_setuptools_build_meta", |
668 | "poetry.core.masonry.api": "python_poetry_core", | 668 | "poetry.core.masonry.api": "python_poetry_core", |
669 | "flit_core.buildapi": "python_flit_core", | 669 | "flit_core.buildapi": "python_flit_core", |
670 | "hatchling.build": "python_hatchling", | ||
670 | } | 671 | } |
671 | 672 | ||
672 | # setuptools.build_meta and flit declare project metadata into the "project" section of pyproject.toml | 673 | # setuptools.build_meta and flit declare project metadata into the "project" section of pyproject.toml |
@@ -716,6 +717,8 @@ class PythonPyprojectTomlRecipeHandler(PythonRecipeHandler): | |||
716 | "poetry-core": "python3-poetry-core", | 717 | "poetry-core": "python3-poetry-core", |
717 | "flit_core": "python3-flit-core", | 718 | "flit_core": "python3-flit-core", |
718 | "setuptools-scm": "python3-setuptools-scm", | 719 | "setuptools-scm": "python3-setuptools-scm", |
720 | "hatchling": "python3-hatchling", | ||
721 | "hatch-vcs": "python3-hatch-vcs", | ||
719 | } | 722 | } |
720 | 723 | ||
721 | def __init__(self): | 724 | def __init__(self): |
@@ -776,6 +779,7 @@ class PythonPyprojectTomlRecipeHandler(PythonRecipeHandler): | |||
776 | if field == "license": | 779 | if field == "license": |
777 | # For setuptools.build_meta and flit, licence is a table | 780 | # For setuptools.build_meta and flit, licence is a table |
778 | # but for poetry licence is a string | 781 | # but for poetry licence is a string |
782 | # for hatchling, both table (jsonschema) and string (iniconfig) have been used | ||
779 | if build_backend == "poetry.core.masonry.api": | 783 | if build_backend == "poetry.core.masonry.api": |
780 | value = values | 784 | value = values |
781 | else: | 785 | else: |