blob: 22305fe1760bf17c460522d17766f7332d3b0d85 [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 Geissler517393d2023-01-13 08:55:19 -060015 export PYTHONPATH=${STAGING_LIBDIR}/python-sysconfigdata
16 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}