aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/distutils3.bbclass
AgeCommit message (Collapse)Author
2018-09-21distutils{, 3}.bbclass: improve error messagesJens Rehsack
For non-python developers it's difficult to identify where start searching in case of errors. Fixing and marking the string to grep for might help finding some root causes of issues slightly quicker. Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-30distutils/distutils3: do not try to fetch code during do_configureHongxu Jia
For distutils3, any setup.py invoking will cause setup_requires argument to trigger a code fetching. Since the following commit applied in oe-core, code fetching occurs during do_confugire before the do_compile. ... b805cef distutils: clean the build tree in do_configure ... Refer what do_compile did, add var-NO_FETCH_BUILD to do_configure. Sync with distutils3, add do_configure to distutils also. [YOCTO #12084] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-26distutils/setuptools, distutils3/setuptools3: improve reproducibilityHongxu Jia
- Unify var-DISTUTILS_INSTALL_ARGS in distutils and setuptools - Supply "--root" directory to the "install" command, and use it as a prefix to strip off the purported filename encoded in bytecode files. (It strips build path prefix from .pyc files) [YOCTO #8446] [YOCTO #12084] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-26distutils/setuptools-native, distutils3/setuptools3-native: do not try to ↵Hongxu Jia
fetch code during do_compile If a python recipe is using setuptools and the setup_requires argument, where setuptools will use easy_install to fetch the module if it isn't present. The build failed on a machine where a proxy was required, but succeeded on a machine which had direct access to the internet Add var-NO_FETCH_BUILD, and set it in distutils_do_compile which does not allow to fetch code from internet during do_compile. Example result: ... ERROR: Do not try to fetch `pytest-runner1' for building. Please add its native recipe to DEPENDS. Traceback (most recent call last): File "setup.py", line 56, in <module> ... The improvement is flexible for test_requirements argument (used at `setup.py test'), where use easy_install also. [YOCTO #12084] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-10distutils3: pass build arguments when doing a cleanRoss Burton
We should pass the build arguments to setup.py when doing a clean, because sometimes the arguments are required for setup.py get started. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-06distutils: clean the build tree in do_configureRoss Burton
base_do_configure() tries to do "make clean" if there is a Makefile present. For most recipes using distutils there is not a Makefile, but we do know that "setup.py clean" will work so call that instead. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-31distutils3.bbclass: Fix path to python for scriptsSerhii Popovych
This change is similar to the recently introduced change to the distutils.bbclass fixing shebang line in python scripts for nativesdk class builds. v2: Rebased on top of new head. Cc: XE-Linux <xe-linux-external@cisco.com> Signed-off-by: Serhii Popovych <spopovyc@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27classes: Replace "if test" file tests with POSIX file testsRobert P. J. Day
In entire meta/classes/ directory, replace shell tests of the form "if test -? ..." with POSIX tests of the form "if [ -? ... Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30python-native, python3-native: remove the use of exported HOST_SYS and ↵Alexander Kanavin
BUILD_SYS variables The code that utilized them was superseded by the code (in the same patch!) that is utilizing STAGING_LIBDIR/STAGING_INCDIR, and wasn't correct in the first place as HOST_SYS is not necessarily the same as the sysroot directory name. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2016-03-23classes/distutils*: don't hide logs when setup script failsPaul Eggleton
We need to see the output of the setup script in the error message because what we are having bbfatal print here doesn't completely describe what went wrong, thus we should use bbfatal_log here and not bbfatal. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01distutils3: Avoid MACHINE specific checksumsRichard Purdie
The MACHINE variable is used to handle sysroot paths within one of the patches to python3-native. In this context, it is relocation safe and the resulting packages should not have MACHINE specific checksums, therefore excluding MACHINE in this context is safe. This whole setup is ugly and ideally we should come up with a better way of handling this but at least allow a stop gap solution for now. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-29distutils/distutils3: Fix bashismRichard Purdie
read -d is a bashism. Replace with a direct exec to avoid the problem in this case. This fixes silent build failures in do_install of tasks on systems with dash as /bin/sh. Also merge the fix to distutils for only changing necessary files to disutils3 as well. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02classes: Add distutils for python3Khem Raj
In line with python2 add distutils and setuptools classes for handing python3 Use python-distribute instead of python-setuptools in setuptools bbclass Remove --single-version-externally-managed since its setuptools specific and we dont use it anymore Do build_ext as separate step during compile Add DISTUTILS_BUILD_EXT_ARGS for modules to pass flags to build_ext step in setup.py Add build_ext as sepate step during compile and add the cross sysrooted library and headers since we are cross compiling Use ${PYTHON_PN} in place of hardcoding python name Remove the /etc/share if its empty Since OE-Core times we now have machine specific sysroots for targets unlike before when we used arch specific sysroots so reflect that here Use MACHINE for sysroot when not building for build host Python's machinery replaces directories in sysroot path to match OE's staging area sysroots. Earlier we use to have HOST_SYS represent sysroot always but now we use MACHINE to represent target sysroots but HOST_SYS to represent host sysroot. This patch caters to that difference Signed-off-by: Khem Raj <raj.khem@gmail.com>