aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/distutils.bbclass
AgeCommit message (Collapse)Author
2017-03-31distutils.bbclass: Fix path to python for scriptsSerhii Popovych
Commit 11229de (distutils: Replacing path to native python by path to python in the image to support python packages with console-script setup) replaces path to python-native with path to the python interpreter in the target image. However on nativesdk builds ${bindir} expanded to the ${SDKPATHNATIVE}${prefix_nativesdk} making shebang line pointing to the absolute path to env(1) in SDKPATHNATIVE which may not be present if coreutils isn't part of nativesdk. On the other hand commit cf63d90 (bitbake.conf: Define USRBINPATH globally instead of individually) introduces USRBINPATH variable which has correct value regarding build class and intended for this use case. 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-09-14distutils.bbclass: Handle python-backport modulesAlejandro Hernandez
When installing backport modules they stumble upon each other, complaining with the following error: ERROR: The recipe python-backports-ssl is trying to install files into a shared area when those files already exist. This is the correct behavior since thats just the way they were designed, all backport modules provide an __init__.py file (the same among all packages), and without it they simply wouldnt work. distutils handles FILES_${PN}* variables for python packages, but it uses wildcards to include the required files, hence removing the __init__.py files from each backport package during build time is impossible since it doenst actually contain that value, this patch simply removes the __init__.py* files from the staging area if they already exist on sysroot, this way, these are not included in FILES_${PN} anymore, fixing the issue mentioned above. [YOCTO #8207] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23distutils: regenerate pyc files after being modified by sedAlejandro Hernandez
py files are edited by sed and therefore *.pyc files are recreated on first boot, but if you have a read-only filesystem this is not possible. This patch creates pyc files directly after the py files are modified. [YOCTO #7722] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Thomas Roos <roosesweb@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-03distutils.bbclass: consistency between error message and setup.py's commandMario Domenech Goulart
setup.py was called with build as argument, but the error message would report build_ext. Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com>
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-05-08distutils.bbclass: only modify *.py file if it contains path to be removedRadek Dostal
Currently sed command touches every single *.py file. This modifies the timestamp of the file. All *.pyo files will be recompiled during the first boot, because timestamp will not match. This should be only necessary if sed command changes the file. Signed-off-by: Radek Dostal <radek.dostal@streamunlimited.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-02-02classes/distutils: Introduce PYTHON_PNKhem Raj
This is needed to accomodate python3 alongside python2 Signed-off-by: Khem Raj <raj.khem@gmail.com>
2013-12-14distutils bbclass: delete site.py*Koen Kooi
Multiple recipes package this generated file and will clash during installation with: | Collected errors: | * check_data_file_clashes: Package python-nose wants to install file /build/v2013.06/build/tmp-angstrom_v2013_06-eglibc/work/beaglebone-angstrom-linux-gnueabi/cloud9-gnome-image/1.0-r0/rootfs/usr/lib/python2.7/site-packages/site.pyc | But that file is already provided by package * python-setuptools | * check_data_file_clashes: Package python-nose wants to install file /build/v2013.06/build/tmp-angstrom_v2013_06-eglibc/work/beaglebone-angstrom-linux-gnueabi/cloud9-gnome-image/1.0-r0/rootfs/usr/lib/python2.7/site-packages/site.py | But that file is already provided by package * python-setuptools Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-09-25distutils: Replacing path to native path only to be done to non-native ↵Amy Fong
python packages distutils: Replacing path to native path only to be done to non-native python packages distutils: Replacing path to native python by path to python in the image to support python packages with console-script setup resulted in a "bad interpreter" error message because coreutils-native is not a specified dependency of a number of native python packages. We modify the change to apply specifically to non-native packages. Signed-off-by: Amy Fong <Amy.Fong@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14distutils: Replacing path to native python by path to python in the image to ↵Lukas Bulwahn
support python packages with console-script setup When using distutils for a python package based on a python-setuptools installation script that sets up a console script, the header of the console script created by setuptools points to the python-native path. The console scripts are commonly executed in the image, but not in the sysroot environment. Therefore, the header of the console scripts should point to the python interpreter in the image. Setuptools does not allow to set the path of the python interpreter via some command-line argument. Hence after the installation script ran, the distutils class replaces the path in the console script files created by the installation. Signed-off-by: Lukas Bulwahn <Lukas.Bulwahn@oss.bmw-carit.de> sgw - added \ to protect the space. Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-12-05distutils: remove empty datadir/share after it's content is moved to datadirMartin Jansa
* fixes a lot of QA warnings about unpackaged /usr/share/share Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-24distutils/steuptools: Fix files layout and unbreak buildsRichard Purdie
The last two distutils changes progressivly broke the builds. Firstly they moved things from the site_packages directory to being higher up the tree which introduced package QA warnings as a side effect. Secondly, it interacts badly with setuptools which passes in --root=${D} itself. This patch restores the original directory layout, hence fixing the QA warnings and also passes extra options to setuptools to deal with the --root option it passes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22distutils.bblass: change order of args to install stepMatthew McClintock
This let's the user override install-lib argument again if it needs to be something else, otherwise things like python-setuptools won't be able to modify the install-lib dir This fixes a new issue exposed by my previous distutils patch that fixed the python modules default install location. Also, it removes running the install step twice which was inadvertant Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17distutils.bbclass: fix libdir for 64-bit python modules built with distutilsMatthew McClintock
Without this some modules will be intalled in /usr/lib/python2.6/ instead of /usr/${libdir}/python2.6 Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-24distutils.bbclass: don't delete .pyo filesAndreas Oberritter
* Deleting .pyo files causes them to get compiled on the target. * First boot gets *really* slow for python based projects. * No space gets saved on the target. * The package manager doesn't know about the files and therefore fails to uninstall them, occupying space and causing uninstalled python scripts to remain executable. * It's inconsistent, because python itself and autotools based projects already ship .pyo files. * Probably .pyo files were deleted because .pyc files were available earlier, but this has changed and OE-Core's python now only generates optimized .pyo files. Deletion of .pyo was introduced in 2008, python/04-default-is-optimized.patch was introduced in 2009. Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
2012-02-10distutils.bbclass: override LDSHARED so we use the linker for this build and ↵Matthew McClintock
not the one used in sstate-cache Without this fix, when packages are being built using distutils and the python packages were deployed from sstate-cache is it possible that the LD command will contain an invalid sysroot override. We can fix this by always exported LDSHARED, which is the env var that distutil looks for to override creating shared libraries. Signed-off-by: Matthew McClintock <msm@freescale.com>
2011-05-04logging: update existing oe* logging users to the bb* interfaceDarren Hart
The new bash logging class provides bbnote, bbwarn, bbfatal, and bbdebug replacements (as well as bbplain and bberror) for the oe* equivalents. Use the new bb* API in preparation to delete the oe* logging API. This patch was automatically generated by a sed script. The result has been visually inspected and used to build core-image-sato for qemux86. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2011-01-20distutils(-common-base) bbclass: sync with OEKoen Kooi
When using python recipes imported from OE (e.g. python-cheetah) parsing only succeeds when python has already been built due to the PYTHON_DIR references. This commit syncs the classes with OE to make it work, but keeps the *.pyo removal from yocto. Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2009-12-05distutils: Sync with OE.devRichard Purdie
Signed-off-by: Richard Purdie <richard@rex.(none)>
2009-09-17Remove layout_* variablesRichard Purdie
Remove layout_* variables and replace them with variables specific to the different classes. The layout variables were only useful for the native/cross classes and caused more confusion than they solved. They didn't scale to the sdk class. It now clear a small set of native/cross variables fulfil the needs. This patch also changes native.bbclass to use "/" as the STAGING_DIR which makes sense since we're installing binaries into the locations we're compiling them for. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-06-16distutils.bbclass: Sync with OERichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2008-11-07distutils.bbclass: Remove .pyo object files before packaging.Joshua Lock
2008-07-28distutils.bbclass: fix build with new layout of stagingMarcin Juszkiewicz
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4967 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-12Remove hardcoded staging layout assumptionsRichard Purdie
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3117 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-09-02classes/distutils*.bbclass: Merge updates from OERichard Purdie
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2645 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-11-25Fix STAGING_BINDIR for multimachine use by spliting into STAGING_BINDIR and ↵Richard Purdie
STAGING_BINDIR_NATIVE and adding both to PATH git-svn-id: https://svn.o-hand.com/repos/poky/trunk@958 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-07-21Rename /openembedded/ -> /meta/Richard Purdie
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966