Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 1 | # |
| 2 | # Copyright OpenEmbedded Contributors |
| 3 | # |
| 4 | # SPDX-License-Identifier: MIT |
| 5 | # |
| 6 | |
| 7 | inherit python3native |
| 8 | |
| 9 | EXTRA_PYTHON_DEPENDS ?= "" |
| 10 | EXTRA_PYTHON_DEPENDS:class-target = "python3" |
| 11 | DEPENDS:append = " ${EXTRA_PYTHON_DEPENDS}" |
| 12 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 13 | setup_target_config() { |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 14 | export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata" |
Andrew Geissler | 028142b | 2023-05-05 11:29:21 -0500 | [diff] [blame^] | 15 | export PYTHONPATH=${STAGING_LIBDIR}/python-sysconfigdata:$PYTHONPATH |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 16 | export PATH=${STAGING_EXECPREFIXDIR}/python-target-config/:$PATH |
| 17 | } |
| 18 | |
| 19 | do_configure:prepend:class-target() { |
| 20 | setup_target_config |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | do_compile:prepend:class-target() { |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 24 | setup_target_config |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | do_install:prepend:class-target() { |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 28 | setup_target_config |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | do_configure:prepend:class-nativesdk() { |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 32 | setup_target_config |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | do_compile:prepend:class-nativesdk() { |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 36 | setup_target_config |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | do_install:prepend:class-nativesdk() { |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 40 | setup_target_config |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 41 | } |