summaryrefslogtreecommitdiffstats
path: root/meta-python/classes
Commit message (Collapse)AuthorAgeFilesLines
* meta-python: missing closing braceElectric Worry2024-04-151-1/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* meta-python: drop ${PYTHON_PN}Tim Orling2024-02-192-7/+7
| | | | | | | python 2 is long unsupported, so we no longer need this variable. Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* python_mesonpy.bbclass: move to oe-coreTim Orling2024-02-191-52/+0
| | | | | | | | | This is now the declared PEP-517 build-backend for python3-numpy Move the support into oe-core Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* python_mesonpy: New classZoltán Böszörményi2023-06-141-0/+52
| | | | | | | | | | | | | This is a new PEP517 compatible build class for python modules that use pyproject.toml and this: [build-system] build-backend = 'mesonpy' The new class uses python3-meson-python-native. Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* python3-hatchling: remove (now in oe-core)Ross Burton2022-07-021-5/+0
| | | | | | | As of 846e80 this is now in oe-core. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* python3-hatchling: add new recipe and build classRoss Burton2022-05-291-0/+5
| | | | | | | | Hatchling is the build backend used by the Hatch tool. Add the recipe and a pep517 build class. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* meta-python: Clean up recipes and classes that were moved to oe-coreAlejandro Enedino Hernandez Samaniego2022-03-163-56/+0
| | | | | | Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro.hernandez@linux.microsoft.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: tgamblin <trevor.gamblin@windriver.com>
* poetry_core: update for renamed class pip_install_wheel to python_pep517Ross Burton2022-03-141-3/+3
| | | | | Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* poetry-core: clean up classRoss Burton2022-03-101-10/+10
| | | | | | | | | | | | | | | | | | | | There's been a lot of work on this class so clean it up a bit. Rationalise imports, python3-dir is already included in python3native. Don't write a helper script in do_configure, just call the API in do_compile. In the long term this should be using pypa/build instead of calling the API directly. Stub out do_configure as the base configure isn't useful. Write the wheel to PIP_INSTALL_DIST_PATH instead of hard-coding S/dist, and clean it. Use EXPORT_FUNCTIONS on the tasks. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* poetry_core: add helper classTim Orling2022-03-031-0/+15
| | | | | | | poetry.core.masonry.api is one of the common PEP-517 build backends. Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* distutils*.bbclass: move from oe-coreTim Orling2022-03-013-0/+108
| | | | | | | | | | | | | | | | distutils has been deprecated in Python 3.10 and will be removed in Python 3.12 (predicted release date October 2023). For now, move these classes from oe-core to allow users to migrate. A deprecation warning has been added to each class. Documentation is also being dropped in oe-core, but users can refer to 3.4 documentation for the legacy variables and classes. [YOCTO #14610] Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* setuptools3_rust.bbclass: setuptoools Rust pluginTim Orling2022-01-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
* pyo3.bbclass: add class for PyO3 cross-compilationTim Orling2022-01-181-0/+30
| | | | | | | | | | | | | | | | | | | | 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> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
* bandit: add class to perform Bandit scansRoss Burton2018-11-271-0/+63
| | | | | | | 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>
* pypi: remove class that was added to oe-coreDerek Straka2018-01-161-26/+0
| | | | | Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Armin Kuster <akuster808@gmail.com>
* pypi: add default values for UPSTREAM_CHECK_URI and UPSTREAM_CHECK_REGEXDerek Straka2016-12-131-0/+3
| | | | | Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* remove True option to getVar callsJoshua Lock2016-12-021-4/+4
| | | | | | | | | 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>
* pypi: update the base pypi url to use the package info without requiring the ↵Derek Straka2016-07-111-5/+1
| | | | | | | | | | 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>
* pypi: update the pypi class to support the updated URL schemeDerek Straka2016-05-101-1/+5
| | | | | | | | | 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>
* Update pypi classes to avoid setuptools inherit to be more flexibleDerek Straka2016-02-253-23/+23
| | | | | Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* add pypi3 bbclass to make python3 recipe creation easier as wellSven Ebenfeld2016-02-013-21/+23
| | | | Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
* pypi.bbclass: new class to ease writing pypi recipesAndreas Oberritter2015-04-131-0/+21
Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>