summaryrefslogtreecommitdiffstats
path: root/meta/classes/pythonnative.bbclass
AgeCommit message (Collapse)Author
2020-01-19python: remove Python 2 and all supporting classesRoss Burton
Python 2 ceased being maintained on the 1st January 2020. We've already removed all users of it from oe-core so the final step is to move the recipe and supporting classes to meta-python2. The following are removed in this commit: - python and python-native 2.7.17 - python-setuptools - The classes pythonnative, pythondir, distutils, setuptools (From OE-Core rev: 390f3edabfb1f68ed9766245291c5f44ea00cc38) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-07python3native, pythonnative: export PYTHON_LIBRARY and PYTHON_INCLUDE_DIRKhem Raj
packages can use find_package(PythonInterp REQUIRED) find_package(PythonLibs REQUIRED) while we control PYTHON pointing to native py3 the libs and include directories will then point to build host version, which can result in unexpected combination and if we are lucky we get errors if its quite different e.g. py2 libs/includes and py3 executable This variable can be then used to export PYTHON_LIBRARY and PYTHON_INCLUDE_DIR so that above find_packages can work correctly see [1] for how it happens in cmake LLDB uses it see [2] [1] https://github.com/Kitware/CMake/blob/master/Modules/FindPythonLibs.cmake [2] https://github.com/llvm/llvm-project/blob/master/lldb/cmake/modules/LLDBConfig.cmake#L226 (From OE-Core rev: e45c06fe6f9a21c2cd06ae003cb112556382f81e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-02python[3]native: allow use of both native Python 2 and 3Ross Burton
Instead of both classes using ${PYTHON_PN} (which is set by python-dir and python3-dir), hardcode the right values so that it is possible to inherit both pythonnative and python3native at the same time. If both are inherited then both native Pythons are available, but the last to be inherited will be the one to set PYTHON. (From OE-Core rev: 96ccdadb8473daa3c9c2e1cb42fbdff1edd270d6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-14python*native.bbclass: suppress user site dirsMartin Kelly
Currently, $HOME/.local is being added into sys.path for the native Python, causing subtle host contamination. Suppress this by exporting PYTHONNOUSERSITE = "1" as documented in PEP 370. (From OE-Core rev: 8fe9fb4d5a61dcbcb3fc5b9ee0234cc135af873f) Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01pythonnative.bbclass, python3native.bbclass: use DEPENDS_append instead of ↵Alexander Kanavin
DEPENDS += Otherwise -native variants of recipes that use these classes don't get a proper python[3]-native dependency for some reason. (From OE-Core rev: 834514198f9e39ce323270567e3ce744f763b637) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01pythonnative.bbclass, python3native.bbclass: export STAGING_INCDIR, ↵Alexander Kanavin
STAGING_LIBDIR, PYTHON variables We patch Python's distutils modules to access STAGING_INCDIR/LIBDIR, so when they are not set, scripts that utilize distutils (e.g. python-config) fail. Several recipes need to export those manually to prevent such failures, so let's do that in the class instead. PYTHON variable is exported because otherwise autotools' python.m4 macro will pick up its own internal default, which may not be the version that we want. glib recipe in particular was previously using Python 2.x during build due to python.m4 defaulting to it - now it's using Python 3.x, and so needs a small fix in deletion of *.pyc files. (From OE-Core rev: c1e0eb62f2d89b10b187016200018830b1c77945) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25pythonnative: set PYTHON_EXECUTABLE so that cmake can find itAndreas Müller
| CMake Error at /home/a.mueller/tmp/oe-core-glibc/sysroots/x86_64-linux/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message): | Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) [RP: Added comment that is used by cmake] (From OE-Core rev: 66455b8a0758176996028bf23f04391c7baf8abd) Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02classes/distutils: Introduce PYTHON_PNKhem Raj
This is needed to accomodate python3 alongside python2 (From OE-Core rev: ae931c2cf9e48e1fb74b4b727dbf668ea880023f) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26base/perlnative/pythonnative/gzipnative: Add a new variable to enable easier ↵Richard Purdie
handling of native path issues If something is listed in ASSUME_PROVIDED but also manually built (like bzip2-native and bzip2-replacement-native), we need to ensure that the installed binaries are only accessed for things which list the provider in DEPENDS. This patch adds a generic mechanism to handle this instead of everything reinventing the wheel. EXTRANATIVEPATH += "perl-native" will ensure that ${STAGING_BINDIR_NATIVE}/perl-native is added to PATH. This means that: a) Such providers should install to ${bindir}/xxx-native b) Should PROVIDE += "xxxx-replacement-native" c) That users should DEPEND on xxx-replacement-native and have EXTRANATIVEPATH += "xxx-native" This patch enables this at the core level, the bzip2 recipe still needs adjusting to work like this along with adjustment of the users of bzip2-replacement-native (python-native?). (From OE-Core rev: 14b70cd222519e5bccaca955334787f123d9fc54) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-22python-native: Put binaries in seperate directoryMorgan Little
Update python-native to install the binaries in the python-native directory, add pythonnative.bbclass to let recipes that need python-native use the binaries and update disutils access the new binaries. Update distutils-base to inherit pythonnative. (From OE-Core rev: a2e554f731437545e9483a7a73e6847c03f6f48a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>