aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python/classes
AgeCommit message (Collapse)Author
2022-01-15setuptools3_rust.bbclass: setuptoools Rust pluginTim Orling
setuptools-rust is a plugin for setuptools to build Rust Python extensions implemented with PyO3 or rust-cpython. Compile and distribute Python extensions written in Rust as easily as if they were written in C. This class inherits pyo3.bbclass (and therefore cargo.bbclass) and setuptools3.bbclass to make it easier to build Python modules with Rust extensions. Need to call pyo3_do_configure to properly setup the PyO3 environment for cross-compiling. Need to call cargo_common_do_configure to setup cargo_home/config so that the linker properly finds e.g. crti.o and crtbeginS.o It is strongly recommended to provide crates needed for your recipe using the crate:// fetcher. This can be helped with the cargo-bitbake command [1]. If you choose not to use the crate fetcher, bitbake vendoring will not work with setuptools-rust, as it errors out immediately because it cannot find pyo3 or some other crate. The (strongly discouraged) workaround for this is to set: CARGO_DISABLE_BITBAKE_VENDORING = "1" [1] https://crates.io/crates/cargo-bitbake Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2022-01-15pyo3.bbclass: add class for PyO3 cross-compilationTim Orling
PyO3 provides Rust bindings for Python, including tools for creating native Python extension modules. Running and interacting with Python code from a Rust binary is also supported. This class sets up the cross-compilation environment. Export PYO3_CROSS, PYO3_CROSS_LIB_DIR, PYO3_CROSS_INCLUDE_DIR and CARGO_BUILD_TARGET to inform tools like setuptools-rust we are cross-compiling. Export RUSTFLAGS so cargo can find 'std' and 'core' for target Dynamically generate PyO3 config file and export PYO3_CONFIG_FILE absolute path. This is the trick that finally made pyo3 work. Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2018-11-27bandit: add class to perform Bandit scansRoss Burton
Add a class to perform security scans of Python code using Bandit. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-01-16pypi: remove class that was added to oe-coreDerek Straka
Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2016-12-13pypi: add default values for UPSTREAM_CHECK_URI and UPSTREAM_CHECK_REGEXDerek Straka
Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-12-02remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
2016-07-11pypi: update the base pypi url to use the package info without requiring the ↵Derek Straka
hash * Things have finally settled on a URL structure without needing the hash (See https://bitbucket.org/pypa/pypi/issues/438/backwards-compatible-un-hashed-package) Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-05-10pypi: update the pypi class to support the updated URL schemeDerek Straka
pypi has changed the url scheme to use the blake2b rather than names http://permalink.gmane.org/gmane.linux.distributions.nixos/20158 Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-02-25Update pypi classes to avoid setuptools inherit to be more flexibleDerek Straka
Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-02-01add pypi3 bbclass to make python3 recipe creation easier as wellSven Ebenfeld
Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
2015-04-13pypi.bbclass: new class to ease writing pypi recipesAndreas Oberritter
Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>