summaryrefslogtreecommitdiffstats
path: root/meta/classes/distutils.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* distutils.bbclass: Fix path to python for scriptsSerhii Popovych2017-03-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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> (From OE-Core rev: 2a83c22a510e10b169015ce936eb51a6fc959ec1) 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-3/+3
| | | | | | | | | | 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-4/+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>
* distutils.bbclass: Handle python-backport modulesAlejandro Hernandez2015-09-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: e607a89267949b3d5e199b139f752db6000eac25) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils: regenerate pyc files after being modified by sedAlejandro Hernandez2015-06-231-2/+2
| | | | | | | | | | | | | 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] (From OE-Core rev: a0460ac8a2595d4b064b483ca1f282a255ae6411) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils.bbclass: consistency between error message and setup.py's commandMario Domenech Goulart2015-06-031-1/+1
| | | | | | | | | | | setup.py was called with build as argument, but the error message would report build_ext. (From OE-Core rev: 898b286b92b031db64c2143e81a79fbb20da481a) Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils/distutils3: Fix bashismRichard Purdie2014-06-291-6/+2
| | | | | | | | | | | | | 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>
* distutils.bbclass: only modify *.py file if it contains path to be removedRadek Dostal2014-05-081-1/+4
| | | | | | | | | | | | | 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. (From OE-Core rev: 2d01c5a4989dcf03a202c27730a2a8f334e0c37a) Signed-off-by: Radek Dostal <radek.dostal@streamunlimited.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/distutils: Introduce PYTHON_PNKhem Raj2014-02-021-11/+12
| | | | | | | | | | 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>
* distutils bbclass: delete site.py*Koen Kooi2013-12-141-0/+1
| | | | | | | | | | | | | | | | 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 (From OE-Core rev: e53192d98ff8cdc4abe85b42e792da2759b22f84) Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils: Replacing path to native path only to be done to non-native ↵Amy Fong2013-09-261-2/+6
| | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 312b6b33dca565153bc2e92d7ff6dd2974db4edb) 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>
* distutils: Replacing path to native python by path to python in the image to ↵Lukas Bulwahn2012-12-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 11229def87d048c51190b9bd275c73d1f8bf6007) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils: remove empty datadir/share after it's content is moved to datadirMartin Jansa2012-12-051-0/+1
| | | | | | | | | * fixes a lot of QA warnings about unpackaged /usr/share/share (From OE-Core rev: 10457e343b27e63b35e0278b00e9c25106b0cc1b) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils/steuptools: Fix files layout and unbreak buildsRichard Purdie2012-08-241-1/+1
| | | | | | | | | | | | | | | 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. (From OE-Core rev: bed18d5df7915e4127a538be9c7550e185c8c850) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils.bblass: change order of args to install stepMatthew McClintock2012-08-221-2/+1
| | | | | | | | | | | | | | | 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 (From OE-Core rev: 3b23feca31480cc56f55301fd0274e622c40b522) Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils.bbclass: fix libdir for 64-bit python modules built with distutilsMatthew McClintock2012-08-171-0/+1
| | | | | | | | | | | Without this some modules will be intalled in /usr/lib/python2.6/ instead of /usr/${libdir}/python2.6 (From OE-Core rev: bc6bd774aa8a3e085e9cabcefb11c3fc537139d5) Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python-native: Put binaries in seperate directoryMorgan Little2012-07-221-4/+4
| | | | | | | | | | | 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>
* distutils.bbclass: don't delete .pyo filesAndreas Oberritter2012-05-241-4/+0
| | | | | | | | | | | | | | | | | | | | | * 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. (From OE-Core rev: 25e186ad5b75bd2f93435857580bd16698e18e21) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils.bbclass: override LDSHARED so we use the linker for this build and ↵Matthew McClintock2012-02-101-0/+2
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: 3f6b859a29ba7f570b9dae3b5bb7ab4bd7b8cee4) Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* logging: update existing oe* logging users to the bb* interfaceDarren Hart2011-05-041-4/+4
| | | | | | | | | | | | | | 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. (From OE-Core rev: a1f09fce5caba389d0484b169f0cde85d64514fa) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distutils(-common-base) bbclass: sync with OEKoen Kooi2011-01-201-10/+10
| | | | | | | | | 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>
* distutils: Sync with OE.devRichard Purdie2009-12-051-3/+10
| | | | Signed-off-by: Richard Purdie <richard@rex.(none)>
* Remove layout_* variablesRichard Purdie2009-09-171-4/+4
| | | | | | | | | | | | 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>
* distutils.bbclass: Sync with OERichard Purdie2009-06-161-14/+22
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* distutils.bbclass: Remove .pyo object files before packaging.Joshua Lock2008-11-071-0/+2
|
* distutils.bbclass: fix build with new layout of stagingMarcin Juszkiewicz2008-07-281-0/+8
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4967 311d38ba-8fff-0310-9ca6-ca027cbcb966
* Remove hardcoded staging layout assumptionsRichard Purdie2007-11-121-3/+3
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3117 311d38ba-8fff-0310-9ca6-ca027cbcb966
* classes/distutils*.bbclass: Merge updates from OERichard Purdie2007-09-021-6/+40
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2645 311d38ba-8fff-0310-9ca6-ca027cbcb966
* Fix STAGING_BINDIR for multimachine use by spliting into STAGING_BINDIR and ↵Richard Purdie2006-11-251-2/+2
| | | | | | 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
* Rename /openembedded/ -> /meta/Richard Purdie2006-07-211-0/+15
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966