summaryrefslogtreecommitdiffstats
path: root/meta/classes/distutils3.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* distutils{, 3}.bbclass: improve error messagesJens Rehsack2018-09-211-4/+4
| | | | | | | | | | | | | 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. (From OE-Core rev: 44fff749ee7bfe47e88286aec1e8a22e63079ca7) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils/distutils3: do not try to fetch code during do_configureHongxu Jia2018-07-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 9d556092fcc6f04c487afd126d52935bac133165) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils/setuptools, distutils3/setuptools3: improve reproducibilityHongxu Jia2018-07-261-3/+5
| | | | | | | | | | | | | | | | | - 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] (From OE-Core rev: 21f0c5a50e00ac34975d79fd48f08730d8f19b15) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils/setuptools-native, distutils3/setuptools3-native: do not try to ↵Hongxu Jia2018-07-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 57414f4a1c549e6faaa110e6e95ff601b05b7361) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils3: pass build arguments when doing a cleanRoss Burton2018-07-101-1/+1
| | | | | | | | | | We should pass the build arguments to setup.py when doing a clean, because sometimes the arguments are required for setup.py get started. (From OE-Core rev: f9324af88a99eca28b160fa31aa4516fd397e44b) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils: clean the build tree in do_configureRoss Burton2018-07-061-1/+7
| | | | | | | | | | | 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. (From OE-Core rev: b805cefb24566772a2beb5d02036266e45370913) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils3.bbclass: Fix path to python for scriptsSerhii Popovych2017-03-311-2/+2
| | | | | | | | | | | | | | 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> (From OE-Core rev: 49772e1a1f291d1cacce27b381009dbb441c483e) Signed-off-by: Serhii Popovych <spopovyc@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Replace "if test" file tests with POSIX file testsuninative-1.6Robert P. J. Day2017-03-271-1/+1
| | | | | | | | | | In entire meta/classes/ directory, replace shell tests of the form "if test -? ..." with POSIX tests of the form "if [ -? ... (From OE-Core rev: 78928016f4cf38cf6751cb089200bf950d07ae93) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python-native, python3-native: remove the use of exported HOST_SYS and ↵Alexander Kanavin2016-06-011-24/+0
| | | | | | | | | | | | | | 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. (From OE-Core rev: 8834e81a38c24a066bb4fefa93da61011d0db244) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/distutils*: don't hide logs when setup script failsPaul Eggleton2016-03-251-4/+4
| | | | | | | | | | | | 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. (From OE-Core rev: 970a02061b474a238f57cd0cc4db7b62e36dfa3d) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils3: Avoid MACHINE specific checksumsRichard Purdie2015-10-011-0/+4
| | | | | | | | | | | | | | 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. (From OE-Core rev: be4e6ea8a92bd90f354f8c04eade39ccce8b73d5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils/distutils3: Fix bashismRichard Purdie2014-06-291-3/+1
| | | | | | | | | | | | | 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. (From OE-Core rev: 7d61661348cf48cbe379ae600565840ea08664b1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Add distutils for python3Khem Raj2014-02-021-0/+98
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 (From OE-Core rev: 8bb0206ed67228c88dd5bc2d8b36ce28f48b78f4) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>