blob: 08bc619398f59c5160a2135e285e78b4a0dbc1d4 [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7inherit python3native
8
9EXTRA_PYTHON_DEPENDS ?= ""
10EXTRA_PYTHON_DEPENDS:class-target = "python3"
11DEPENDS:append = " ${EXTRA_PYTHON_DEPENDS}"
12
Andrew Geissler517393d2023-01-13 08:55:19 -060013setup_target_config() {
Patrick Williams92b42cb2022-09-03 06:53:57 -050014 export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
Andrew Geissler028142b2023-05-05 11:29:21 -050015 export PYTHONPATH=${STAGING_LIBDIR}/python-sysconfigdata:$PYTHONPATH
Andrew Geissler517393d2023-01-13 08:55:19 -060016 export PATH=${STAGING_EXECPREFIXDIR}/python-target-config/:$PATH
17}
18
19do_configure:prepend:class-target() {
20 setup_target_config
Patrick Williams92b42cb2022-09-03 06:53:57 -050021}
22
23do_compile:prepend:class-target() {
Andrew Geissler517393d2023-01-13 08:55:19 -060024 setup_target_config
Patrick Williams92b42cb2022-09-03 06:53:57 -050025}
26
27do_install:prepend:class-target() {
Andrew Geissler517393d2023-01-13 08:55:19 -060028 setup_target_config
Patrick Williams92b42cb2022-09-03 06:53:57 -050029}
30
31do_configure:prepend:class-nativesdk() {
Andrew Geissler517393d2023-01-13 08:55:19 -060032 setup_target_config
Patrick Williams92b42cb2022-09-03 06:53:57 -050033}
34
35do_compile:prepend:class-nativesdk() {
Andrew Geissler517393d2023-01-13 08:55:19 -060036 setup_target_config
Patrick Williams92b42cb2022-09-03 06:53:57 -050037}
38
39do_install:prepend:class-nativesdk() {
Andrew Geissler517393d2023-01-13 08:55:19 -060040 setup_target_config
Patrick Williams92b42cb2022-09-03 06:53:57 -050041}