Files
poky/meta/classes/python_pyo3.bbclass
Richard Purdie 971d5f7b81 classes: Add copyright statements to files without one
Where there isn't a copyright statement, add one to make it explicit.
Also drop editor config lines where they were present.

(From OE-Core rev: 880c1ea3edc8edef974e65b2d424fc36809ea034)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 11:58:01 +01:00

35 lines
822 B
Plaintext

#
# Copyright OpenEmbedded Contributors
#
#
# This class helps make sure that Python extensions built with PyO3
# and setuptools_rust properly set up the environment for cross compilation
#
inherit cargo python3-dir siteinfo
export PYO3_CROSS="1"
export PYO3_CROSS_PYTHON_VERSION="${PYTHON_BASEVERSION}"
export PYO3_CROSS_LIB_DIR="${STAGING_LIBDIR}"
export CARGO_BUILD_TARGET="${RUST_HOST_SYS}"
export RUSTFLAGS
export PYO3_PYTHON="${PYTHON}"
export PYO3_CONFIG_FILE="${WORKDIR}/pyo3.config"
python_pyo3_do_configure () {
cat > ${WORKDIR}/pyo3.config << EOF
implementation=CPython
version=${PYTHON_BASEVERSION}
shared=true
abi3=false
lib_name=${PYTHON_DIR}
lib_dir=${STAGING_LIBDIR}
pointer_width=${SITEINFO_BITS}
build_flags=WITH_THREAD
suppress_build_script_link_lines=false
EOF
}
EXPORT_FUNCTIONS do_configure