diff options
author | Ross Burton <ross@burtonini.com> | 2022-03-16 18:32:43 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-17 16:44:33 +0000 |
commit | 7fee41dcef576312e1f12ef485e9b07b9612569b (patch) | |
tree | 95dd71b64064021af04d59c495a1c948b9233534 | |
parent | 6f5ee7fffb259516d7e715eeb68c89afceb9ef83 (diff) | |
download | poky-7fee41dcef576312e1f12ef485e9b07b9612569b.tar.gz |
classes/python_pep517: consolidate stub do_configure
As PEP517 doesn't have an explicit configure step, we can stub out the
do_configure task once instead of the calling classes doing it.
(From OE-Core rev: fd17edbd00f1583eb9e1912ab269dd4dc2631a6f)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/python_flit_core.bbclass | 6 | ||||
-rw-r--r-- | meta/classes/python_pep517.bbclass | 8 | ||||
-rw-r--r-- | meta/classes/python_poetry_core.bbclass | 6 | ||||
-rw-r--r-- | meta/classes/setuptools_build_meta.bbclass | 6 |
4 files changed, 7 insertions, 19 deletions
diff --git a/meta/classes/python_flit_core.bbclass b/meta/classes/python_flit_core.bbclass index eef361bb1b..96652aa204 100644 --- a/meta/classes/python_flit_core.bbclass +++ b/meta/classes/python_flit_core.bbclass | |||
@@ -3,9 +3,3 @@ inherit python_pep517 python3native python3-dir setuptools3-base | |||
3 | DEPENDS += "python3 python3-flit-core-native" | 3 | DEPENDS += "python3 python3-flit-core-native" |
4 | 4 | ||
5 | PEP517_BUILD_API = "flit_core.buildapi" | 5 | PEP517_BUILD_API = "flit_core.buildapi" |
6 | |||
7 | python_flit_core_do_configure () { | ||
8 | : | ||
9 | } | ||
10 | |||
11 | EXPORT_FUNCTIONS do_configure | ||
diff --git a/meta/classes/python_pep517.bbclass b/meta/classes/python_pep517.bbclass index 73bcf9ba07..34ffdc9c0d 100644 --- a/meta/classes/python_pep517.bbclass +++ b/meta/classes/python_pep517.bbclass | |||
@@ -22,6 +22,12 @@ PEP517_INSTALL_PYTHON:class-native = "nativepython3" | |||
22 | # pypa/installer option to control the bytecode compilation | 22 | # pypa/installer option to control the bytecode compilation |
23 | INSTALL_WHEEL_COMPILE_BYTECODE ?= "--compile-bytecode=0" | 23 | INSTALL_WHEEL_COMPILE_BYTECODE ?= "--compile-bytecode=0" |
24 | 24 | ||
25 | # PEP517 doesn't have a specific configure step, so set an empty do_configure to avoid | ||
26 | # running base_do_configure. | ||
27 | python_pep517_do_configure () { | ||
28 | : | ||
29 | } | ||
30 | |||
25 | # When we have Python 3.11 we can parse pyproject.toml to determine the build | 31 | # When we have Python 3.11 we can parse pyproject.toml to determine the build |
26 | # API entry point directly | 32 | # API entry point directly |
27 | python_pep517_do_compile () { | 33 | python_pep517_do_compile () { |
@@ -47,4 +53,4 @@ python_pep517_do_bootstrap_install () { | |||
47 | unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PEP517_WHEEL_PATH}/*.whl | 53 | unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PEP517_WHEEL_PATH}/*.whl |
48 | } | 54 | } |
49 | 55 | ||
50 | EXPORT_FUNCTIONS do_compile do_install | 56 | EXPORT_FUNCTIONS do_configure do_compile do_install |
diff --git a/meta/classes/python_poetry_core.bbclass b/meta/classes/python_poetry_core.bbclass index 3fecb6c6bb..577663b8f1 100644 --- a/meta/classes/python_poetry_core.bbclass +++ b/meta/classes/python_poetry_core.bbclass | |||
@@ -3,9 +3,3 @@ inherit python_pep517 python3native setuptools3-base | |||
3 | DEPENDS += "python3-poetry-core-native" | 3 | DEPENDS += "python3-poetry-core-native" |
4 | 4 | ||
5 | PEP517_BUILD_API = "poetry.core.masonry.api" | 5 | PEP517_BUILD_API = "poetry.core.masonry.api" |
6 | |||
7 | python_poetry_core_do_configure () { | ||
8 | : | ||
9 | } | ||
10 | |||
11 | EXPORT_FUNCTIONS do_configure | ||
diff --git a/meta/classes/setuptools_build_meta.bbclass b/meta/classes/setuptools_build_meta.bbclass index 62b037363d..b2bba35a0b 100644 --- a/meta/classes/setuptools_build_meta.bbclass +++ b/meta/classes/setuptools_build_meta.bbclass | |||
@@ -3,9 +3,3 @@ inherit setuptools3-base python_pep517 | |||
3 | DEPENDS += "python3-setuptools-native python3-wheel-native" | 3 | DEPENDS += "python3-setuptools-native python3-wheel-native" |
4 | 4 | ||
5 | PEP517_BUILD_API = "setuptools.build_meta" | 5 | PEP517_BUILD_API = "setuptools.build_meta" |
6 | |||
7 | setuptools_build_meta_do_configure () { | ||
8 | : | ||
9 | } | ||
10 | |||
11 | EXPORT_FUNCTIONS do_configure | ||