summaryrefslogtreecommitdiff
path: root/package/python
AgeCommit message (Collapse)Author
2016-12-22package/python: security bump version to 2.7.13Bernd Kuhls
Rebased patches 004 & 010. Changelog: https://hg.python.org/cpython/raw-file/v2.7.13/Misc/NEWS Fixes CVE-2016-2183 & CVE-2016-1000110. This bump also fixes the host build with openssl 1.1.0, http://patchwork.ozlabs.org/patch/696139/ is not needed anymore. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-11-09python: fix double format detectionJérôme Pouiller
Python is not able to detect if compiler double representation is compliant with IEE754: checking whether C doubles are little-endian IEEE 754 binary64... no checking whether C doubles are big-endian IEEE 754 binary64... no checking whether C doubles are ARM mixed-endian IEEE 754 binary64... no Accordingly 'legacy' mode isused. It is possible to check this at runtime by check if 'sys.float_repr_style' contains 'short' or 'legacy'. Calculus correctness is not garanteed with 'legacy'. Problem is better described here: http://stackoverflow.com/questions/29920294/what-causes-pythons-float-repr-style-to-use-legacy https://bugs.python.org/issue7117 However, all gcc architecture use a representation compliant with IEE754. So, we can enable it unconditionnaly. Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> [Thomas: adjust condition to avoid usage of qstrip, suggested by Baruch.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-09-18python: do not use hg or svn when availableThomas Petazzoni
During the execution of its configure script, Python tries to find an available "hg" and "svn" installation, and if available, will try to use them to get information from the version control system. To do this, it tries to communicate over the network, potentially over ports that are blocked, causing the build to halt. This was reported by a user as part of bug #7802. To solve this, we simply make the Python script use /bin/false as the "hg" and "svn" programs. Fixes bug #7802 for the python package. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-05packages: use the <PKG>_TARGET_FINALIZE_HOOKSYann E. MORIN
Register package-specific target-finalize hooks with the newly-introduced <PKG>_TARGET_FINALIZE_HOOKS. This incidentally fixes luarocks, which was registering target-finalize hooks even when it was not enabled. To be noted, the skeleton package is not converted, because it is not optional, we always have it; so its hooks would always be registered anyway. Besides, the followup patches would render this conversion moot anyway, since those hooks would be spread across the various skeleton packages. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-30package/python: Fix rebased patch 011-remove-python-symlink.patchBernd Kuhls
While rebasing one line was accidently not removed, this patch fixes http://autobuild.buildroot.net/results/018/018303a5d551aaa6c91013ab0352437e9a2c28bc/ Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-06-29package/python: bump version to 2.7.12Bernd Kuhls
Rebased 011-remove-python-symlink.patch [Peter: correct .hash file comment as pointed out by Baruch] Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-05-26python/python3: globalize *.pyc files compilationYegor Yefremov
Currently, each python package (be it the python interpreter package itself or external python modules) is responsible for compiling its .py into .pyc files. Unfortunately, this is not ideal as some packages only install .py files without compiling them into .pyc files. In this case, if the Buildroot configuration specifies to keep only the .pyc files, the .py files are removed and lost. To address this, this commit changes the logic by making the compilation of .pyc files a global operation: the python interpreter packages register a target finalize hook that is in charge of compiling all installed .py files. The *.pyc generation on a per package basis is disabled in the python-package infrastructure by passing the "--no-compile" option to setup.py. The *.pyc generation for the Python interpreter internal modules is disabled through --disable-pyc-build configure option. A small helper script is used to perform the compilation, the purpose of this script is to abort the compilation process if one of the .py file cannot be compiled. It has been provided by Samuel Martin and integrated into this commit. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Cc: Samuel Martin <s.martin49@gmail.com> [Thomas: - rework for python 3.5 - integrate Samuel proposal that allows to detect compilation failures.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-26python/python3: use --no-run-if-empty xargs optionThomas Petazzoni
As suggested by Samuel Martin, this commit adds the option --no-run-if-empty xargs option to the "find ... | xargs ..." logic used in the python and python3 target-finalize hooks to remove py/pyc/pyo files. This ensures that the command doesn't fail if there are no files matching the pattern. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-17python: remove *.pyo filesThomas Petazzoni
Even though we disable the build of .pyo files in the interpreter, nothing prevents other packages to install them. Since we only want to keep either .py or .pyc or both, let's add a target finalize hooks that removes all .pyo files. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> [Thomas: add --no-run-if-empty option to xargs, as suggested by Samuel.] Reviewed-by: Samuel Martin <s.martin49@gmail.com>
2016-05-17python: align the target finalize hooks with python3Thomas Petazzoni
Since the bump of python3 to 3.5.x, the target finalize hooks registered by the python3 have been changed a little bit. For the sake of consistency, this commit aligns the target finalize hooks registered by the python package so that they look the same as the ones used by python3. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-12-12package/python: bump to version 2.7.11Jörg Krause
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> [Thomas: quick run-time test on ARM.]
2015-06-22python: bump to 2.7.10Thomas Petazzoni
Patches are simply refreshed, except 004-sysconfigdata-install-location.patch where a minor conflict resolution was needed. [Peter: fixup .hash as pointed out by Arnout] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-05-31python: add patch to fix logic to get gcc pathsThomas Petazzoni
The Python setup.py has a function called add_gcc_paths(), which executes gcc -E -v to get the list of header paths searched by gcc. However, the logic of setup.py is only valid with the normal english output of gcc: it doesn't work if a non-english locale is set. This causes setup.py to not find certain headers (such as zlib.h) and therefore disabling the build of such extensions. Reported-by: Bruno Coudoin <bruno.coudoin@gcompris.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-05-02python: needs dynamic library supportPeter Korsgaard
Fixes: http://autobuild.buildroot.net/results/7a0/7a044d5c8bf7526fcf4f0ec80a2b9b18d1f632a1/ http://autobuild.buildroot.net/results/27f/27ff12127dee3b1a8df86ef8b05681d695b2cac8/ http://autobuild.buildroot.net/results/7ce/7ce78169b661dcd6c04dc3ee5b1877c0de09f91d/ http://autobuild.buildroot.net/results/e58/e583583bc0ba4aff84d896fb7e6caf4793e03eb9/ And many more. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-05-02python: move toolchain comment above main optionPeter Korsgaard
So suboptions are correctly indented. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-04-19python: add hash fileGustavo Zacarias
Even though there's a hash at https://www.python.org/downloads/release/python-279/ prefer using the sig since that's just md5. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-02-21package/python: change BR2_PACKAGE_PYTHON_PYEXPAT descriptionAngelo Compagnucci
This patch changes BR2_PACKAGE_PYTHON_PYEXPAT description and help text to underline that all the xml libraries will be included in python. It also reorders alphabetically the affected option. Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-02-14packages: all salute the passing of avr32Yann E. MORIN
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-01-10python: add an option to make the ossaudiodev module optional for the targetThomas Petazzoni
Now that we have a configure option in Python to enable/disable the ossaudiodev module, this commit adds a configuration option to the target Python to explicitly enable/disable this module. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-01-10python: disable building ossaudiodev module for host-pythonZoltan Gyarmati
This module is not needed to build the target Python, and can cause some build issues on certain systems (when <linux/soundcard.h> does not contain the OSS related definitions). Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-01-10python: add patch to make ossaudiodev module optionalZoltan Gyarmati
This module causes some build failures in certain setups and is not very useful. Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-01-02python: rename patches to the new conventionThomas Petazzoni
Note that we don't use completely sequential numbers, because patches below 100 are used to address cross-compilation issues in Python, while patches above 100 are used to make more Python modules configurable. [Thomas: fixup commit log.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2015-01-02python: bump to 2.7.9Thomas Petazzoni
In addition to doing the bump, this commit also: - Refreshes all the patches - Removes python-003-properly-detect-if-python-build.patch, which has been applied upstream. - Passes the --without-ensurepip option, like is done in Python 3, to avoid having Python use PIP to automatically download stuff when it is being built. - PYTHON_LIBTOOL_PATH = NO is added to prevent Buildroot from trying to patch a version of libtool for which we don't have matching patches, which isn't a problem since we're anyway not using the part of the Python sources that uses libtool (it's the built-in copy of libffi, and we use the external libffi). Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-10-07.mk files: bulk aligment and whitespace cleanup of assignmentsThomas De Schampheleire
The Buildroot coding style defines one space around make assignments and does not align the assignment symbols. This patch does a bulk fix of offending packages. The package infrastructures (or more in general assignments to calculated variable names, like $(2)_FOO) are not touched. Alignment of line continuation characters (\) is kept as-is. The sed command used to do this replacement is: find * -name "*.mk" | xargs sed -i \ -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*$#\1 \2#' -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\]\+\)$#\1 \2 \3#' -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\ \t]\+\s*\\\)\s*$#\1 \2 \3#' -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\(\s*\\\)#\1 \2\3#' Brief explanation of this command: ^\([A-Z0-9a-z_]\+\) a regular variable at the beginning of the line \([?:+]\?=\) any assignment character =, :=, ?=, += \([^\\]\+\) any string not containing a line continuation \([^\\ \t]\+\s*\\\) string, optional whitespace, followed by a line continuation character \(\s*\\\) optional whitespace, followed by a line continuation character Hence, the first subexpression handles empty assignments, the second handles regular assignments, the third handles regular assignments with line continuation, and the fourth empty assignments with line continuation. This expression was tested on following test text: (initial tab not included) FOO = spaces before FOO = spaces before and after FOO = tab before FOO = tab and spaces before FOO = tab after FOO = tab and spaces after FOO = spaces and tab after FOO = \ FOO = bar \ FOO = bar space \ FOO = \ GENIMAGE_DEPENDENCIES = host-pkgconf libconfuse FOO += spaces before FOO ?= spaces before and after FOO := FOO = FOO = FOO = FOO = $(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C AT91BOOTSTRAP3_DEFCONFIG = \ AXEL_DISABLE_I18N=--i18n=0 After this bulk change, following manual fixups were done: - fix line continuation alignment in cegui06 and spice (the sed expression leaves the number of whitespace between the value and line continuation character intact, but the whitespace before that could have changed, causing misalignment. - qt5base was reverted, as this package uses extensive alignment which actually makes the code more readable. Finally, the end result was manually reviewed. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Cc: Yann E. Morin <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-05python, python3: convert py/pyc removal to TARGET_FINALIZE_HOOKSThomas Petazzoni
Since the removal of py/pyc files is Python-specific, this commit moves the logic removing those files to python.mk and python3.mk respectively. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-04packages: rename FOO_CONF_OPT into FOO_CONF_OPTSThomas De Schampheleire
To be consistent with the recent change of FOO_MAKE_OPT into FOO_MAKE_OPTS, make the same change for FOO_CONF_OPT. Sed command used: find * -type f | xargs sed -i 's#_CONF_OPT\>#&S#g' Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-09-21python, python3: add patch to prevent distutils from adjusting the shebangChristophe Vu-Brugier
The copy_scripts() method in distutils copies the scripts listed in the setup file and adjusts the first line to refer to the current Python interpreter. When cross-compiling, this means that the adjusted shebang refers to the host Python interpreter. As a consequence, we add a patch for python and python3 that force copy_scripts() to preserve the shebang when cross-compilation is detected. Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-09-13libffi and python: need threads supportJérôme Pouiller
libffi depends on pthreads. Python depends on libffi (it can provide a builtin libffi, but also depends on pthreads). Thus this patch also disable Python support if toolchain is compiled w/o treads support. Fixes http://sysmic.org/~jezz/results/204099dd: ../src/closures.c:119:21: fatal error: pthread.h: No such file or directory [Peter: fix comment dependencies, add python3] Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-08-06python: renumber patchBaruch Siach
Advance the serial number of a patch from 015 to 016 to avoid collision and confusion. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-18python: fix termios build for xtensaBaruch Siach
The xtensa ioctls.h header references struct serial_multiport_struct that is not defined in this header or included headers. ioctls.h also references tty_struct that is not exported to userspace at all. Add a patch fixing these issues. This is only a workaround as the real problem should be fixed in the kernel (by removing all struct references like all other archs). But since we support older kernel versions we'll have to carry this patch for some time. Fixes: http://autobuild.buildroot.net/results/12b/12b5612828d7f1fc7d1f69fc01341d5a6e628db5/ Cc: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-15python, python3: build with tzset supportHenry Margies
This patch adds support for time.tzset() in Python 2.7 and Python 3. The Python configure script sets ac_cv_working_tzset to 'no' when cross compiling, although it should be available and work with all toolchains supported by Buildroot (?). The patch below pre-sets the variable so that time.tzset() works. [Thomas: adjust commit log.] Signed-off-by: Henry Margies <henry.margies@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-15package/python: fix sqlite3 extension without threadsYann E. MORIN
Fix a compiler error when building the sqlite3 extension, when the toolchain does not have threads. Fixes: http://autobuild.buildroot.net/results/10f/10f268cd55f16ee53f4c5e17e1248b0a1820f6ea/ Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-09python: improve isolation of build environment and error handlingThomas Petazzoni
This commit mainly fixes bug #7268 by improving the isolation of the build environment by making sure some host environment header paths do not leak into the target build. The investigation was done by David <buildroot-2014@inbox.com>. This is done by not calling the add_multiarch_paths() function of setup.py when we're cross-compiling, a change made in the newly introduced python-013-dont-add-multiarch-path.patch. In addition to this, another patch is added to make sure the build is aborted when one of the Python module fails to build. This is done in python-014-abort-on-failed-modules.patch. Without this, the Python setup.py script simply logs which module failed to build, but doesn't abort, so it's hard to notice when there is a problem. [Peter: slightly reword commit message] Cc: David <buildroot-2014@inbox.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-08python: bump to version 2.7.8Thomas Petazzoni
The different patches are just refreshed to apply without fuzz, there are no changes/conflicts. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-01python: do not install the IDLE editorThomas Petazzoni
IDLE is the Python IDE built with the tkinter GUI toolkit, for which the main script has always been removed from the target (so it was never usable in Buildroot). However, we were still installing about 800 to 900 KB of .pyc files used only by the idle editor. This commit adds a Python patch that completely gets rid of the compilation/installation of the idle editor. As a consequence, it is no longer needed to manually remove the 'idle' program from the target in python.mk. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-07-01python: bump to Python 2.7.7Thomas Petazzoni
Status of patches: - python-013-fix-readline-6.3.patch is removed, as it was a backport from an upstream fix. - all other patches are updated, with no special changes other than solving minor conflicts. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-26python2: Fix disabling module bsddbBernd Kuhls
Using this minimal defconfig BR2_TOOLCHAIN_EXTERNAL=y BR2_PACKAGE_PYTHON=y BR2_PACKAGE_BERKELEYDB=y the current code does not prevent the build of output/build/python-2.7.6/Modules/_bsddb.o because the module is really called _bsddb, see python-2.7.6/Modules/_bsddb.c, line 9604. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-04-20python: fix readline extension compilation with readline 6.3Ivan Sergeev
Signed-off-by: Ivan Sergeev <vsergeev@kumunetworks.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-20python: do not rely only on LIBRARY_PATH for old compilersThomas Petazzoni
The cross-compilation improvements integrated in Python rely on the compiler exposing a line starting with LIBRARY_PATH when called with -E -v. This is used by Python setup.py to find the installation locations of libraries. However, this LIBRARY_PATH line is not shown by very old compilers, such as the gcc 4.2.x compiler used on the AVR32 architecture. This causes libraries installed in the sysroot, such as libffi, to not be detected by the setup.py script. To fix this problem, this patch adds addtional logic to setup.py, which consists in deriving the library paths from the sysroot location, if no LIBRARY_PATH field was found. Fixes: http://autobuild.buildroot.org/results/1aa/1aad2d677dbf7b0a3cb0120a35f45123124f51ab/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-06python: fix host-python symlink installation when no python is selectedSamuel Martin
When no python interpreter is selected, all host-python symlink installation were disabled. This could lead to a non-existing $(HOST_DIR)/usr/bin/python program. Fixes: http://autobuild.buildroot.net/results/6e7/6e74a343b4e8e113fd34d45c9279419e233afe8a/ Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-04-05python: rework python symlinks installationSamuel Martin
This change adds a patch to python disabling the installation of the python and python-config symlinks. This allows Buildroot to control these symlinks' installation: * the python symlink should be unconditionally installed in the target tree, and the python-config symlink in the staging tree, since it is only built and installed in the target tree if the user selected it; * the python and python-config symlinks should only be installed in the host tree when python(2) is the selection of the user for the target. Otherwise, when python3 is selected for the target, the host-python may be required to built some packages. In such cases, the python symlink should points to python3 (so should the python-config symlink) to reflect the staging/target tree. [Thomas: fix comments according to Yann's suggestions, and replaced python(2) by python2, as suggested by Yann.] Signed-off-by: Samuel Martin <s.martin49@gmail.com> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-03-05host-python{, 3}: fix parallel install of libpythonArnout Vandecappelle
During installation, host-python and host-python3 run the freshly built python executable. This is done with a proper LD_LIBRARY_PATH to make sure it picks up the libpython in the build directory. However, the python binary has an RPATH pointing to the $(HOST_DIR)/usr/lib. Therefore, if libpython exists there, it will be used instead. If the install step is run in parallel, it is possible that libpython is already partially copied to $(HOST_DIR)/usr/lib when python is run. This gives an error like: python: error while loading shared libraries: $(HOST_DIR)/usr/lib/libpython3.4m.so.1.0: file too short The fix is simple: use RUNPATH instead of RPATH, which allows LD_LIBRARY_PATH to override RUNPATH. That way, the libpython in the build directory is always used. RUNPATH is enabled by passing --enable-new-dtags to the linker. Fixes e.g. http://autobuild.buildroot.net/results/2a6/2a62de3247ba5ad273f03d01e690a3eeb11aa7b4 Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-03-02python: fixup python-config scriptGustavo Zacarias
The original version uses sysconfig from the python interpreter (normally host-python) which isn't really suited to provide information of the target python. Use the pure shell preprocessed backport from the upcoming python 3.4 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-03-01python, python3: fix unicodedata enablingThomas Petazzoni
A confusion was made when applying commit c3d539b53ff0533e91ae849dbdcdd589b0fec0cc ('host python/python3: conditionally disable unicodedata') and then commit 73293e88c828c9bddc0b684a4603f86f70f8e876 ('python, python3: enable unicodedata for host-python, needed by setuptools'). The first commit added the enabling of unicodedata in the host Python when the target Python is configured with unicodedata, which is necessary because building the target unicodedata Python module requires having unicodedata support in the host Python. The second commit enabled the unicodedata unconditionally in the host Python, because it is needed by host-setuptools. However, when the second commit was applied, the logic that consisted in disabling unicodedate in the host Python when not needed was kept, which resulted in breaking the build of host-setuptools due to the lack of unicodedata support in the host python. This commit fixes that by only leaving the unconditional --enable-unicodedata in the host Python configuration options, and therefore removing the problematic conditional --disable-unicodedata. Fixes: http://autobuild.buildroot.org/results/b62/b622fc14776f5a6c26ff0d1fb882f4ae6cccc5d8/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-02-28Merge branch 'next'Peter Korsgaard
Conflicts: Makefile package/dmraid/Config.in package/gdb/Config.in.host package/linux-headers/linux-headers.mk package/python/python.mk package/python3/python3.mk package/rt-tests/Config.in package/sdl/sdl.mk package/systemd/systemd-01-fix-getty-unit.patch package/systemd/systemd-02-fix-page-size.patch package/systemd/systemd-03-uclibc-fix.patch package/udev/Config.in package/udisks/Config.in package/vlc/vlc.mk system/Config.in Quite some merge conflicts, hopefully I didn't screw up anything. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-19python, python3: fix to ensure libpython is strippedPrzemyslaw Wrzos
The python and python3 builds mark libpython as read-only which prevents it from being stripped out correctly for the target. Signed-off-by: Przemyslaw Wrzos <przemyslaw.wrzos@calyptech.com> Acked-by: Thomas De Schampheleire <thomas.de_schampheleire@alcatel-lucent.com> Tested-by: Thomas De Schampheleire <thomas.de_schampheleire@alcatel-lucent.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-19python, python3: enable unicodedata for host-python, needed by setuptoolsThomas Petazzoni
As we are going to bump setuptools to a much newer version, the host python needs to be built with support for unicodedata. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-18host python/python3: conditionally disable unicodedataThomas De Schampheleire
The host python always had --disable-unicodedata, regardless of the corresponding configuration option BR2_PACKAGE_PYTHON_UNICODEDATA. Since the host python is used to byte-compile python modules, this meant that such modules could not contain unicode strings. For example, following statement in a python module: print u"\N{SOLIDUS}" would cause the byte-compilation to fail with message: SyntaxError: ("(unicode error) \\N escapes not supported (can't load unicodedata module)", Instead, conditionally disable unicodedata based on BR2_PACKAGE_PYTHON_UNICODEDATA, also for the host python. This fixes bug #6542 (https://bugs.busybox.net/show_bug.cgi?id=6542) Reported-by: Gernot Vormayr <gvormayr@gmail.com> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-14python: bump to 2.7.6Thomas Petazzoni
Even though jumping from 2.7.3 to 2.7.6 looks like a minor version bump, it is in fact a fairly significant one, because a good number of changes to help cross-compilation have been merged into Python upstream. Therefore, most of our patches are affected by this change. In detail, this commit: * Renames all the patches to follow the naming convention of patches in Buildroot: the patch file names should not have any version number. * The patches numbered above 100, that add configuration options to disable certain modules of the Python standard library, are only renamed and slightly adapted, they didn't change that much. * The patches numbered below 100 are almost entirely rewritten: many of the cross-compilation problems that used to exist in Python 2.7.3 no longer exist, and the number of remaining problems is smaller, and can be fixed with smaller patches. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-14python: expose PYTHON_PATHThomas Petazzoni
As a preparation to make the Python infrastructure support both Python and Python 3, as well as the bump of Python 2 and 3, we need the Python package to expose the Python module path in a variable called PYTHON_PATH. It will be used by the following commits. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>