summaryrefslogtreecommitdiffstats
path: root/package/python3
Commit message (Collapse)AuthorAgeFilesLines
* python3: make readline, gzip, bzip2 and xz really optionalThomas Petazzoni2017-03-093-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | The BR2_PACKAGE_PYTHON3_{READLINE,ZLIB,BZIP2,XZ} options were so far only bringing in the necessary dependencies, relying on the Python build system to automatically detect them. However, this means that even if one of those option was disabled, if their dependency was found, Python would build the corresponding module, which is really not what the user would expect. For example, if you have: BR2_PACKAGE_READLINE=y # BR2_PACKAGE_PYTHON3_READLINE is not set Then you would still get the readline Python module built and installed. This commit fixes that by adding new --{enable,disable} options, and use them in python3.mk. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python3: explicitly disable OpenSSL support for the targetThomas Petazzoni2017-03-091-0/+2
| | | | | | | | | | | | | | | | | | Commit fa627738266e ("python3: do not use the system OpenSSL in the host variant") added a patch that allows to disable building the OpenSSL related modules in Python, even if OpenSSL is found. But in this commit, it was only used to unconditionally disable OpenSSL support for the host python3. This commit extends that to use the --disable-openssl option also for the target python3, when BR2_PACKAGE_PYTHON3_SSL. This ensures that if BR2_PACKAGE_PYTHON3_SSL is disabled, but BR2_PACKAGE_OPENSSL is enabled, we still don't get the OpenSSL modules built, as the user would expect. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python3: refresh Git formatted patchesThomas Petazzoni2017-03-0931-176/+183
| | | | | | | | | This refreshes the set of python3 patches so they apply cleanly on the v3.5.2 tag of cpython Github repository. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python3: do not use the system OpenSSL in the host variantNicolas Cavallari2016-11-252-1/+25
| | | | | | | | | | | | | | | | | | | host-python3 currently detect if there is an usable OpenSSL installation and conditionnaly compiles the 'ssl', '_ssl' and '_hashlib' modules. This may break compilation if the system's OpenSSL has been updated to 1.1.0 because of a bug in python, see https://bugs.python.org/issue26470 for details. Unlike Python 2.7, Python 3 unconditionnaly compiles fallbacks for common hash algorithm, so disabling OpenSSL will still leave Python 3 with implementations of common hash algorithm. This adds a patch to configure.ac patch to implement a --disable-openssl option. Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python3: fix double format detectionJérôme Pouiller2016-11-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | 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: rework condition to not use strip, as suggested by Baruch.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python3: move "select" after "bool" in Config.inThomas Petazzoni2016-10-091-6/+6
| | | | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/python3: add optional support for lzmaBernd Kuhls2016-10-092-0/+10
| | | | | | | | Needed by the upcoming python-mwscrape2slob package. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> [Thomas: move "select" after "bool".] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python3: do not use hg when availableThomas Petazzoni2016-09-181-2/+8
| | | | | | | | | | | | | | | | During the execution of its configure script, Python 3 tries to find an available "hg" installation, and if available, will try to use it 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" program. Fixes bug #7802 for the python3 package. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* packages: use the <PKG>_TARGET_FINALIZE_HOOKSYann E. MORIN2016-07-051-6/+4
| | | | | | | | | | | | | | | | | | 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>
* package/python3: bump to version 3.5.2Bernd Kuhls2016-06-292-4/+4
| | | | | Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* python/python3: globalize *.pyc files compilationYegor Yefremov2016-05-261-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* python/python3: use --no-run-if-empty xargs optionThomas Petazzoni2016-05-261-3/+6
| | | | | | | | | | | | 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>
* python3: bump to 3.5.1Thomas Petazzoni2016-05-1733-274/+333
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The major changes in terms of Buildroot packaging are: - Due to PEP488, Python no longer generates .pyc (unoptimized) and .pyo (optimized) byte-code files. Instead, it generates <foo>.pyc, <foo>.opt-1.pyc and <foo>.opt-2.pyc. Therefore, we removed the --disable-pyo-build option and kept only the --disable-pyc-build option, which completely disables building all .pyc files. In addition, since the optimized .opt-X.pyc files don't work if the corresponding un-optimized .pyc file is not present, we are for the moment unconditionally removing the optimized ones (keeping both the unoptimized and optimized ones doubles the required filesystem size!). So basically we preserve the behavior we had before this commit: BR2_PACKAGE_PYTHON3_PY_ONLY -> only *.py BR2_PACKAGE_PYTHON3_PYC_ONLY -> only non-optimized *.pyc BR2_PACKAGE_PYTHON3_PY_PYC -> both the *.py and non-optimized *.pyc To achieve this, the TARGET_FINALIZE_HOOKS are reworked: PYTHON3_REMOVE_PY_FILES is responsible for removing *.py files in the BR2_PACKAGE_PYTHON3_PYC_ONLY case. PYTHON3_REMOVE_PYC_FILES is responsible for removing *.pyc files in the BR2_PACKAGE_PYTHON3_PY_ONLY case. PYTHON3_REMOVE_OPTIMIZED_PYC_FILES is responsible for removing the optimized *.opt-1.pyc and *.opt-2.pyc files, which is done unconditionally. - The PEP3147 disabling patch had to be significantly reworked due to the code having changed heavily. The code was moved into a _bootstrap_external.py, which is a "frozen" Python module, i.e a module generated into a .h file at compile time using the _freeze_importlib program. - Due to the above, we now need to regenerate importlib.h at build time. Unfortunately, for the target Python _freeze_importlib is built for the target, so we can't run it on the build machine. To fix this, we copy the _freeze_importlib program from the host-python in $(HOST_DIR), and then patch the target python to use it. Since the same solution can be used for 'pgen', we do it, and avoid having to touch the graminit.{c,h} files. 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>
* python3: switch to Git formatted patchesThomas Petazzoni2016-01-0530-296/+523
| | | | | | | | | | | In preparation for the bump to Python 3.5.0, let's switch all the patches to the Git format. This way, a Git repository of the Python source code can be used to manage those patches, which makes it easier to bump to newer Python versions. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* python3: add patch to fix PEP 3147 issue with automake built packagesChristophe Vu-Brugier2015-11-175-118/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Packages built with automake use a `py-compile` helper to byte-compile Python source files. This script uses the "py_compile" module from the standard library. In turn, the compile() function in the "py_compile" module invokes the cache_from_source() function provided by importlib. This commit adds a new patch named "020-importlib-no-pep3147.patch" that changes cache_from_source() and source_from_cache() in importlib to get rid of the "__pycache__" directory. This commit fixes the following import error in kmod when the module is built for Python 3: >>> from kmod import Kmod Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name 'Kmod' Moreover, this commit removes two patches that are no longer necessary since modifying cache_from_source() and source_from_cache() disables PEP 3147 for the standard library and distutils / setuptools. * 004-old-stdlib-cache.patch * 016-distutils-no-pep3147.patch Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Revert "python3: add patch to fix PEP 3147 issue with automake built packages"Thomas Petazzoni2015-11-054-73/+118
| | | | | | | | | This reverts commit b58685355943d2c34606432d978d9efc6027f564, which causes some build failures of Python 3: http://autobuild.buildroot.org/results/923/923c4242dbd6d277c1d88f663b5916ceced985d4/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python3: add patch to fix PEP 3147 issue with automake built packagesChristophe Vu-Brugier2015-11-044-118/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Packages built with automake use a `py-compile` helper to byte-compile Python source files. This script uses the "py_compile" module from the standard library. In turn, the compile() function in the "py_compile" module invokes the cache_from_source() function provided by importlib. This commit adds a new patch named "020-importlib-no-pep3147.patch" that changes cache_from_source() and source_from_cache() in importlib to get rid of the "__pycache__" directory. This commit fixes the following import error in kmod when the module is built for Python 3: >>> from kmod import Kmod Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name 'Kmod' Moreover, this commit removes two patches that are no longer necessary since modifying cache_from_source() and source_from_cache() disables PEP 3147 for the standard library and distutils / setuptools. * 004-old-stdlib-cache.patch * 016-distutils-no-pep3147.patch Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python3: add patch to fix logic to get gcc pathsThomas Petazzoni2015-05-311-0/+27
| | | | | | | | | | | | | 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>
* python3: needs dynamic library supportPeter Korsgaard2015-04-281-2/+3
| | | | | | | | | | | | Fixes: http://autobuild.buildroot.net/results/c65/c65c2b2c4c2ca328c4f26ba38798c40ab02c8772/ http://autobuild.buildroot.net/results/e0d/e0db38ca12dbe664d472c4f6f3f1ade4150119c3/ http://autobuild.buildroot.net/results/8e1/8e196d05dd65cdd782c8d41d937a7d9d2ef7dc1a/ http://autobuild.buildroot.net/results/e3a/e3a71f5d05a3e176a9e641e758b1ba64c9560991/ And many more. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* python3: move toolchain comment above main optionPeter Korsgaard2015-04-281-4/+4
| | | | | | So suboptions are correctly indented. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* python3: add hash fileThomas Petazzoni2015-04-281-0/+4
| | | | | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* python3: bump to version 3.4.3Thomas Petazzoni2015-04-2824-89/+64
| | | | | | | | | | | All patches are simply refreshed, except 002-properly-detect-if-python-build.patch which is removed because an identical fix has been merged upstream: https://github.com/python/cpython/commit/e128ea78e5964929ca902bebc07c242d58609dfc Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Merge branch 'next'Peter Korsgaard2015-03-022-60/+6
|\ | | | | | | Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
| * package/python3: change BR2_PACKAGE_PYTHON_PYEXPAT descriptionAngelo Compagnucci2015-02-211-6/+6
| | | | | | | | | | | | | | | | | | | | | | This patch changes BR2_PACKAGE_PYTHON3_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>
| * packages: all salute the passing of avr32Yann E. MORIN2015-02-141-54/+0
| | | | | | | | | | Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* | python3: fix invalid ncursesw header pathThomas Petazzoni2015-02-121-0/+21
|/ | | | | | | | | | | | | | | This commit adds a patch to python3 that makes sure it does not use an invalid header path (pointing to host headers) when including ncursesw support. Fixes: http://autobuild.buildroot.org/results/9bd/9bdaa392e8dd00c6ebee156b758e3c0cac480237/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Romain Naour <romain.naour@openwide.fr> Tested-by: Romain Naour <romain.naour@openwide.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* python3: make the ossaudiodev module optionalThomas Petazzoni2015-01-103-0/+33
| | | | | | | | | Like was done for the 'python' package, also make the ossaudiodev module optional for 'python3'. ossaudiodev is always disabled for host-python3, and a new option is added to enable it for the target python3. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python3: rename patches to the new conventionThomas Petazzoni2015-01-0229-0/+0
| | | | | | | | | | | | Note that we don't use completely sequential numbers, because patches below 100 are used to address cross-compilation issues in Python 3, while patches above 100 are used to make more Python 3 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>
* python3: bump to 3.4.2Thomas Petazzoni2015-01-0226-84/+82
| | | | | | | | | | | | | | | This commit bumps python3 to Python 3.4.2. Two patches had to be changed slightly to fix some minor conflicts. PYTHON3_LIBTOOL_PATH = NO was 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>
* Merge branch 'next'Peter Korsgaard2014-12-011-0/+60
|\ | | | | | | | | | | | | | | | | Conflicts: Makefile package/flac/0001-fix-altivec-logic.patch package/grantlee/Config.in Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
| * python3: add patch to fix --includes / --ldflags output of python3-configPeter Korsgaard2014-11-221-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The build/real prefix handling using sed breaks if build != real and the standard include / lib directories are used ($prefix/include and $prefix/lib). E.G. prefix_build="/usr", libdir="$prefix/lib", includedir="$prefix/include". If this gets installed with make DESTDIR="/foo" install, then we end up with prefix_real = prefix = "/foo/usr" as expected, but includedir="/foo/foo/usr/include" and libdir="/foo/foo/usr/lib" because of the double sed invocation (prefix is already expanded). Work around it by ensuring we only match the beginning of the string. Submitted upstream: http://bugs.python.org/issue22907 Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* | python3: don't use wcsftime() on uClibcThomas Petazzoni2014-11-131-0/+6
|/ | | | | | | | | | | As investigated in bug #7646, wcsftime() doesn't work properly with uClibc. Until it gets fixed in uClibc, let's tell Python 3 to not use it. Python 3 will fall back to strftime(), which works properly. [Peter: fix typo in comment] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Beyonlo <beyonlo@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* .mk files: bulk aligment and whitespace cleanup of assignmentsThomas De Schampheleire2014-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* python, python3: convert py/pyc removal to TARGET_FINALIZE_HOOKSThomas Petazzoni2014-10-051-0/+14
| | | | | | | | 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>
* python3: remove unneeded __pycache__ directoriesThomas Petazzoni2014-10-051-0/+4
| | | | | | | | | | | | | | | | | The __pycache__ directories are only needed on PEP3147-enabled installations, which is not the choice Buildroot has made. However, during the build process of the target Python, the separation between the target and host Python is not entirely complete, and starting the host Python to byte-compile the target Python modules triggers the compilation of a bunch of __pycache__ directories by the host Python, which uses a PEP 3147 installation. For now, simply get rid of those useless directories after the installation of Python is completed. In the long term, it would be good to achieve a better isolation between the host and target build to avoid this issue. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python3: add distutils fix for PEP 3147 issueThomas Petazzoni2014-10-051-0/+36
| | | | | | | | | | | | | | | | | | | | | | Python 3 has a new standard for installing .pyc file, called PEP 3147. Unfortunately, this standard requires both the .py and .pyc files to be installed for a Python module to be found. This is quite annoying on space-constrained embedded systems, since the .py file is technically not required for execution. For the Python standard library, our Python 3 package already contains a patch named python3-004-old-stdlib-cache.patch, which allows to disable the PEP 3147 installation. But that leaves the distutils/setuptools package an unsolved problem. This patch therefore adds a new patch to Python, which makes distutils package use the traditional installation path when byte compiling, rather than the PEP 3147 installation path. Since setuptools relies on distutils internally, it also fixes setuptools based packages. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
* packages: rename FOO_CONF_OPT into FOO_CONF_OPTSThomas De Schampheleire2014-10-041-12/+12
| | | | | | | | | | | | 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>
* python, python3: add patch to prevent distutils from adjusting the shebangChristophe Vu-Brugier2014-09-211-0/+25
| | | | | | | | | | | | | | 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>
* libffi and python: need threads supportJérôme Pouiller2014-09-131-2/+3
| | | | | | | | | | | | | | | | 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>
* python3: fix termios build for xtensaBaruch Siach2014-08-061-0/+23
| | | | | | | | | | | Forward port the patch from c821210b1bfa (python: fix termios build for xtensa) to python3. Fixes: http://autobuild.buildroot.net/results/e7f/e7f71fbcb0796f315052947382fa39d85c5dc8fe/ Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python3: define license and license filesThomas Petazzoni2014-07-271-0/+2
| | | | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python3: optional decimal module supportThomas Petazzoni2014-07-273-0/+66
| | | | | | | | | | | | | | | | | | This commit makes the decimal module support optional: since Python 3.3 it relies on an external library. The source code of this library is available built-in as part of the Python sources, but in Buildroot we generally prefer to use the external library when possible. To achieve this, this commit adds a patch to Python that is similar to the one we use for expat support, but this time for the libmpdec/mpdecimal library. As a consequence, since mpdecimal now builds properly even when <fenv.h> is not available (on i386), this commit fixes: http://autobuild.buildroot.org/results/b64/b64d5c941a7cac00619da3a0696939f86a8eafc2/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python, python3: build with tzset supportHenry Margies2014-07-151-0/+1
| | | | | | | | | | | | | | 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>
* python3: improve isolation of build environment and error handlingThomas Petazzoni2014-07-092-0/+49
| | | | | | | | | | | | | | | | | | | | | 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 python3-012-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 python3-013-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>
* python3: bump to version 3.4.1Thomas Petazzoni2014-07-0815-58/+59
| | | | | | | | | A few minor updates on the patches were needed to resolve some conflicts on the main Makefile.pre.in file, in the list of modules to build/install. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* python3: do not rely only on LIBRARY_PATH for old compilersThomas Petazzoni2014-04-201-0/+54
| | | | | | | | | | | | | | | | | | | | | | 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/7a6/7a65e381cc04bf8f74fd63a6dcda502f3c26aeef/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python3: correctly fix PYTHON3_PATHThomas Petazzoni2014-04-121-1/+1
| | | | | | | | | | Commit 6251ccf03254f832c6e6ba0203ad46c18f217ca9 ('python3: fix the value of PYTHON3_PATH') tried to fix the value of PYTHON3_PATH, but did it incorrectly: it changed PYTHON_VERSION_MAJOR to PYTHON_VERSION3_MAJOR, while it should have been PYTHON3_VERSION_MAJOR. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python3: fix the value of PYTHON3_PATHThomas Petazzoni2014-04-051-1/+1
| | | | | | | | | | The PYTHON3_PATH was incorrectly referencing the site-packages of Python 2 packages, due to the usage of PYTHON_VERSION_MAJOR, instead of PYTHON3_VERSION_MAJOR. This commit fixes that by using the correct variable, which in our testing fixed the build of python-pyasn against python3. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python3: rework python symlinks installationSamuel Martin2014-04-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | This patch reworks the way python3 and python3-config symlink are installed. Buildroot wants to control these symlinks' installation: * the python3 symlink should be unconditionally installed in the target tree, and the python3-config symlink in the staging tree, since it is the only python package built and installed in the target tree if the user selected it; * the python3 and python3-config symlinks should only be installed in the host tree when python3 is the selection of the user for the target. [Thomas: fix comment 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>
* python3: drop PYTHON3_VERSION_MINOR variableJerzy Grzegorek2014-03-271-4/+3
| | | | | Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
OpenPOWER on IntegriCloud