summaryrefslogtreecommitdiffstats
path: root/package/python
Commit message (Collapse)AuthorAgeFilesLines
* package/python: add upstream security fix for CVE-2019-5010Peter Korsgaard2019-02-021-0/+121
| | | | | | | | | Fixes CVE-2019-5010: NULL pointer dereference using a specially crafted X509 certificate https://bugs.python.org/issue35746 Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* package/python: bump version to 2.7.15Bernd Kuhls2018-06-164-73/+9
| | | | | | | | | | Rebased patch 0009, removed patch 0035 after upstream commit https://github.com/python/cpython/commit/0b91f8a668201fc58fa732b8acc496caedfdbae0 Updated license hash after 2018 bump. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* package/python: add upstream GCC8 build fixStefan Becker2018-05-021-0/+65
| | | | | | | | Fedora 28 switched to GCC8. Signed-off-by: Stefan Becker <chemobejk@gmail.com> [Thomas: fixup location of SoB in the patch.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* package/*/Config.in: fix help text check-package warningsThomas Petazzoni2017-12-181-2/+4
| | | | | | | | | | | | | This commit fixes the warnings reported by check-package on the help text of all package Config.in files, related to the formatting of the help text: should start with a tab, then 2 spaces, then at most 62 characters. The vast majority of warnings fixed were caused by too long lines. A few warnings were related to spaces being used instead of a tab to indent the help text. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/python: add license hashSamuel Martin2017-11-051-0/+2
| | | | | Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* package/python: bump version to 2.7.14Bernd Kuhls2017-10-153-6/+10
| | | | | | | | | | Rebased patch 0016, changed _SITE to https. Release notes: https://raw.githubusercontent.com/python/cpython/84471935ed2f62b8c5758fd544c7d37076fe0fa5/Misc/NEWS Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python: remove target Python packages from PYTHONPATHThomas Petazzoni2017-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently have $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/ inside the PYTHON_PATH variable, which gets used to define PYTHONPATH, passed to the host Python interpreter when building/installing target packages. However, this is terribly wrong, as it causes the host interpreter to potentially import target Python packages. This is wrong for several reasons: - Some Python packages might need some Python modules to be installed on the host (described in setup_requires in setup.py), but their installation currently works because by luck the corresponding Python module is installed for the target. Some of those cases were happening for real, and fixed by previous patches. - Some Python packages include some native code, therefore built for a specific CPU architecture. When you point the host Python interpreter to native libraries built for the target, you get nice build failures, such as the one affecting the python-cffi related packages. Making this change allows to fix the python-cffi related build failures: http://autobuild.buildroot.net/results/a9af84f2d845ee25e2b7d8b92aef485112b46060/ (python-cryptography) http://autobuild.buildroot.net/results/b017c4f6b4d45c0afbf06a80dbd3f2ebe5d49d20/ (python-pynacl) http://autobuild.buildroot.net/results/25144ea191ad46d851b31d3a2f0ef939f215494b/ (python-smbus-cffi) This change has been verified with the following defconfig that enables a lot of Python packages: BR2_arm=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2017.05-834-gb595627.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y BR2_TOOLCHAIN_EXTERNAL_LOCALE=y BR2_TOOLCHAIN_EXTERNAL_CXX=y BR2_INIT_NONE=y BR2_SYSTEM_BIN_SH_NONE=y BR2_PACKAGE_PYTHON=y BR2_PACKAGE_PYTHON_ALSAAUDIO=y BR2_PACKAGE_PYTHON_ARROW=y BR2_PACKAGE_PYTHON_ATTRS=y BR2_PACKAGE_PYTHON_AUTOBAHN=y BR2_PACKAGE_PYTHON_BITSTRING=y BR2_PACKAGE_PYTHON_BOTTLE=y BR2_PACKAGE_PYTHON_CAN=y BR2_PACKAGE_PYTHON_CBOR=y BR2_PACKAGE_PYTHON_CHARDET=y BR2_PACKAGE_PYTHON_CHEETAH=y BR2_PACKAGE_PYTHON_CHERRYPY=y BR2_PACKAGE_PYTHON_CONFIGOBJ=y BR2_PACKAGE_PYTHON_CONFIGSHELL_FB=y BR2_PACKAGE_PYTHON_CRC16=y BR2_PACKAGE_PYTHON_CRCMOD=y BR2_PACKAGE_PYTHON_CSSSELECT=y BR2_PACKAGE_PYTHON_CSSUTILS=y BR2_PACKAGE_PYTHON_DAEMON=y BR2_PACKAGE_PYTHON_DIALOG=y BR2_PACKAGE_PYTHON_DICTTOXML=y BR2_PACKAGE_PYTHON_DJANGO=y BR2_PACKAGE_PYTHON_DOCOPT=y BR2_PACKAGE_PYTHON_DPKT=y BR2_PACKAGE_PYTHON_ECDSA=y BR2_PACKAGE_PYTHON_ENUM=y BR2_PACKAGE_PYTHON_FLASK_BABEL=y BR2_PACKAGE_PYTHON_FLASK_JSONRPC=y BR2_PACKAGE_PYTHON_FLASK_LOGIN=y BR2_PACKAGE_PYTHON_FLUP=y BR2_PACKAGE_PYTHON_GOBJECT=y BR2_PACKAGE_PYTHON_GUNICORN=y BR2_PACKAGE_PYTHON_HTML5LIB=y BR2_PACKAGE_PYTHON_HTTPLIB2=y BR2_PACKAGE_PYTHON_HUMANIZE=y BR2_PACKAGE_PYTHON_ID3=y BR2_PACKAGE_PYTHON_INIPARSE=y BR2_PACKAGE_PYTHON_IOWAIT=y BR2_PACKAGE_PYTHON_IPADDR=y BR2_PACKAGE_PYTHON_IPY=y BR2_PACKAGE_PYTHON_IPYTHON=y BR2_PACKAGE_PYTHON_JSON_SCHEMA_VALIDATOR=y BR2_PACKAGE_PYTHON_KEYRING=y BR2_PACKAGE_PYTHON_LIBCONFIG=y BR2_PACKAGE_PYTHON_LMDB=y BR2_PACKAGE_PYTHON_LXML=y BR2_PACKAGE_PYTHON_MAD=y BR2_PACKAGE_PYTHON_MARKDOWN=y BR2_PACKAGE_PYTHON_MELD3=y BR2_PACKAGE_PYTHON_MISTUNE=y BR2_PACKAGE_PYTHON_MSGPACK=y BR2_PACKAGE_PYTHON_MUTAGEN=y BR2_PACKAGE_PYTHON_MWSCRAPE=y BR2_PACKAGE_PYTHON_NETADDR=y BR2_PACKAGE_PYTHON_NETIFACES=y BR2_PACKAGE_PYTHON_NFC=y BR2_PACKAGE_PYTHON_NUMPY=y BR2_PACKAGE_PYTHON_PAHO_MQTT=y BR2_PACKAGE_PYTHON_PAM=y BR2_PACKAGE_PYTHON_PARAMIKO=y BR2_PACKAGE_PYTHON_PILLOW=y BR2_PACKAGE_PYTHON_POSIX_IPC=y BR2_PACKAGE_PYTHON_PSUTIL=y BR2_PACKAGE_PYTHON_PUDB=y BR2_PACKAGE_PYTHON_PYCLI=y BR2_PACKAGE_PYTHON_PYCPARSER=y BR2_PACKAGE_PYTHON_PYELFTOOLS=y BR2_PACKAGE_PYTHON_PYFTPDLIB=y BR2_PACKAGE_PYTHON_PYGAME=y BR2_PACKAGE_PYTHON_PYGAME_IMAGE=y BR2_PACKAGE_PYTHON_PYGAME_EXAMPLES=y BR2_PACKAGE_PYTHON_PYGAME_FONT=y BR2_PACKAGE_PYTHON_PYGAME_MIXER=y BR2_PACKAGE_PYTHON_PYINOTIFY=y BR2_PACKAGE_PYTHON_PYLIBFTDI=y BR2_PACKAGE_PYTHON_PYMYSQL=y BR2_PACKAGE_PYTHON_PYPARTED=y BR2_PACKAGE_PYTHON_PYPCAP=y BR2_PACKAGE_PYTHON_PYQRCODE=y BR2_PACKAGE_PYTHON_PYRATEMP=y BR2_PACKAGE_PYTHON_PYRO=y BR2_PACKAGE_PYTHON_PYROUTE2=y BR2_PACKAGE_PYTHON_PYSENDFILE=y BR2_PACKAGE_PYTHON_PYSMB=y BR2_PACKAGE_PYTHON_PYSNMP_APPS=y BR2_PACKAGE_PYTHON_PYSNMP_MIBS=y BR2_PACKAGE_PYTHON_PYSOCKS=y BR2_PACKAGE_PYTHON_PYTABLEWRITER=y BR2_PACKAGE_PYTHON_PYTRIE=y BR2_PACKAGE_PYTHON_PYUSB=y BR2_PACKAGE_PYTHON_PYXB=y BR2_PACKAGE_PYTHON_PYZMQ=y BR2_PACKAGE_PYTHON_REQUESTS_TOOLBELT=y BR2_PACKAGE_PYTHON_RPI_GPIO=y BR2_PACKAGE_PYTHON_RTSLIB_FB=y BR2_PACKAGE_PYTHON_SDNOTIFY=y BR2_PACKAGE_PYTHON_SERIAL=y BR2_PACKAGE_PYTHON_SETPROCTITLE=y BR2_PACKAGE_PYTHON_SH=y BR2_PACKAGE_PYTHON_SHUTILWHICH=y BR2_PACKAGE_PYTHON_SIMPLEJSON=y BR2_PACKAGE_PYTHON_SMBUS_CFFI=y BR2_PACKAGE_PYTHON_SOCKETIO=y BR2_PACKAGE_PYTHON_SORTEDCONTAINERS=y BR2_PACKAGE_PYTHON_SPIDEV=y BR2_PACKAGE_PYTHON_THRIFT=y BR2_PACKAGE_PYTHON_TOMAKO=y BR2_PACKAGE_PYTHON_TREQ=y BR2_PACKAGE_PYTHON_U_MSGPACK=y BR2_PACKAGE_PYTHON_UBJSON=y BR2_PACKAGE_PYTHON_UJSON=y BR2_PACKAGE_PYTHON_URLLIB3=y BR2_PACKAGE_PYTHON_VERSIONTOOLS=y BR2_PACKAGE_PYTHON_WATCHDOG=y BR2_PACKAGE_PYTHON_WEB2PY=y BR2_PACKAGE_PYTHON_WEBPY=y BR2_PACKAGE_PYTHON_WHOOSH=y BR2_PACKAGE_PYTHON_WS4PY=y BR2_PACKAGE_PYTHON_WSACCEL=y BR2_PACKAGE_PYTHON_XLUTILS=y 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>
* Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/binArnout Vandecappelle2017-07-051-3/+3
| | | | | | | | | | | Since things are no longer installed in $(HOST_DIR)/usr, the callers should also not refer to it. This is a mechanical change with git grep -l '$(HOST_DIR)/usr/bin' | xargs sed -i 's%$(HOST_DIR)/usr/bin%$(HOST_DIR)/bin%g' Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python: use the new gettext logicThomas Petazzoni2017-07-051-5/+1
| | | | | | | | This commit switches to use the new gettext logic, which involves using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies on gettext/host-gettext. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/p*/Config.in: fix ordering of statementsAdam Duskett2017-05-011-6/+6
| | | | | | | | | | | | | The check-package script when ran gives warnings on ordering issues on all of these Config files. This patch cleans up all warnings related to the ordering in the Config files for packages starting with the letter p in the package directory. The appropriate ordering is: type, default, depends on, select, help See http://nightly.buildroot.org/#_config_files for more information. Signed-off-by: Adam Duskett <Adamduskett@outlook.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package makefiles: clean up backslash spacing.Adam Duskett2017-04-221-28/+28
| | | | | | | | | | The check-package script when ran gave warnings on only using one space before backslashes on all of these makefiles. This patch cleans up all warnings related to the one space before backslashes rule in the make files in the package directory. Signed-off-by: Adam Duskett <aduskett@codeblue.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python: use SPDX short identifier for license stringRahul Bedarkar2017-04-091-1/+1
| | | | | Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python2: remove full path from .pycJérôme Pouiller2017-04-011-3/+4
| | | | | | | | | | | | | .pyc files include path to source .py file. This patch changes the way `pycompile.py' is launched in order to only keep the part relative to $TARGET_DIR. This work was sponsored by `BA Robotic Systems'. Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python: re-add patch mistakenly removedThomas Petazzoni2017-04-011-0/+37
| | | | | | | | | | | | As noticed by André Hentschel <nerv@dawncrow.de>, commit 652076293235276e2f978fe377322a6cbd615455 ("python: move to Git formatted patches") mistakenly removed 018-fix-add-gcc-paths-logic.patch. This causes bug #7971 to re-appear. To fix this, we re-introduce the missing patch. Reported-by: André Hentschel <nerv@dawncrow.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* arch, linux, package: remove whitespacesBernd Kuhls2017-03-291-3/+3
| | | | | | | | | | | | Whitespaces were searched using the following regex: [ ]{1,}\t and then manually removed in most of the cases. For xserver_xorg-server.mk, tabs before backslashes were removed. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python2: generate reproducible .pycJérôme Pouiller2017-03-201-1/+9
| | | | | | | | | | | | | | | | | | | .pyc files contain the modification time of the corresponding .py source. In order to make the build reproducible, we fix the modification time of all .py before compiling .pyc files. In addition, since pycompile relies on the modification time to know if a file needs to be recompiled, it is safer to force recompilation of all source files. This work was sponsored by `BA Robotic Systems'. Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> Reviewed-by: Samuel Martin <s.martin49@gmail.com> [Thomas: do not register PYTHON_FIX_TIME as a PYTHON_TARGET_FINALIZE_HOOKS, instead call it inside PYTHON_CREATE_PYC_FILES before doing the byte compilation.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-elecrons.com>
* package/python: add optional support for libintlBernd Kuhls2017-03-121-0/+4
| | | | | | | | | | | | | | | | | | Python links to gettext when available: $ output/host/usr/bin/i586-buildroot-linux-uclibc-readelf -a output/target/usr/lib/python2.7/lib-dynload/_locale.so | grep NEEDED 0x00000001 (NEEDED) Shared library: [libintl.so.8] 0x00000001 (NEEDED) Shared library: [libpython2.7.so.1.0] 0x00000001 (NEEDED) Shared library: [libc.so.0] In comparison the same library compiled without gettext: $ output/host/usr/bin/i586-buildroot-linux-uclibc-readelf -a output/target/usr/lib/python2.7/lib-dynload/_locale.so | grep NEEDED 0x00000001 (NEEDED) Shared library: [libpython2.7.so.1.0] 0x00000001 (NEEDED) Shared library: [libc.so.0] Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python: fix disabling the SSL moduleThomas Petazzoni2017-03-091-3/+3
| | | | | | | | | | The Python extension is _ssl, not ssl. Due to this mistake in the patch, even with --disable-ssl passed on the command line, the _ssl.so Python extension would still be built. 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>
* python: make hashlib and readline modules really optionalThomas Petazzoni2017-03-093-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | The BR2_PACKAGE_PYTHON_{READLINE,HASHLIB} 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_PYTHON_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 python.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>
* python: move to Git formatted patchesThomas Petazzoni2017-03-0933-357/+587
| | | | | | | | | | | | | Now that the cpython project has a nice Github repository, with tags, it's much nicer to handle the stack of Python patches with Git. The python3 package patches had already been converted, but not the python package patches. Therefore, this commit does the move. There is no functional change, only reformatting of the patches. 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>
* package/python: apply unicode config to host buildChris Smart2017-02-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently the host build of Python 2 defaults to narrow unicode (UCS2), ignoring the BR2_PACKAGE_PYTHON_UCS4 configuration option which may be set to wide (UCS4). This results in host and target Python packages which are incompatible in subtle ways. For example, installing wheels into the target fails when they are made with the host python, citing incompatibility (as can be seen by the package tags which may be "cp27u-manylinux1" instead of "cp27mu-manylinux1"). Compiling the host Python 2 with the same UCS configuration as the target ensures that the packages are compatible (and the tags match). This does not affect Python 3 as support for narrow unicode was deprecated in version 3.3, see https://www.python.org/dev/peps/pep-0393/ Thanks to Tony Breeds <tony@bakeyournoodle.com> for reporting this. Signed-off-by: Chris Smart <mail@csmart.io> [Thomas: add comment in the code.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/python: security bump version to 2.7.13Bernd Kuhls2016-12-224-8/+8
| | | | | | | | | | | | | | | 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>
* python: 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: adjust condition to avoid usage of qstrip, suggested by Baruch.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* python: do not use hg or svn when availableThomas Petazzoni2016-09-181-2/+10
| | | | | | | | | | | | | | | | 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>
* 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/python: Fix rebased patch 011-remove-python-symlink.patchBernd Kuhls2016-06-301-2/+2
| | | | | | | | 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>
* package/python: bump version to 2.7.12Bernd Kuhls2016-06-293-9/+11
| | | | | | | | 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>
* python/python3: globalize *.pyc files compilationYegor Yefremov2016-05-261-1/+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>
* python: remove *.pyo filesThomas Petazzoni2016-05-171-0/+8
| | | | | | | | | | | 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>
* python: align the target finalize hooks with python3Thomas Petazzoni2016-05-171-4/+4
| | | | | | | | | | | | 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>
* package/python: bump to version 2.7.11Jörg Krause2015-12-122-4/+4
| | | | | | | 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.]
* python: bump to 2.7.10Thomas Petazzoni2015-06-2224-39/+38
| | | | | | | | | | | 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>
* python: 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>
* python: needs dynamic library supportPeter Korsgaard2015-05-021-2/+3
| | | | | | | | | | | | 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>
* python: move toolchain comment above main optionPeter Korsgaard2015-05-021-4/+4
| | | | | | So suboptions are correctly indented. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* python: add hash fileGustavo Zacarias2015-04-191-0/+2
| | | | | | | | | 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>
* package/python: change BR2_PACKAGE_PYTHON_PYEXPAT descriptionAngelo Compagnucci2015-02-211-6/+6
| | | | | | | | | | | 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>
* 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>
* python: add an option to make the ossaudiodev module optional for the targetThomas Petazzoni2015-01-102-0/+11
| | | | | | | | 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>
* python: disable building ossaudiodev module for host-pythonZoltan Gyarmati2015-01-101-0/+1
| | | | | | | | | 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>
* python: add patch to make ossaudiodev module optionalZoltan Gyarmati2015-01-101-0/+30
| | | | | | | | 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>
* python: rename patches to the new conventionThomas Petazzoni2015-01-0231-0/+0
| | | | | | | | | | | | 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>
* python: bump to 2.7.9Thomas Petazzoni2015-01-0230-122/+103
| | | | | | | | | | | | | | | | | | | | 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>
* .mk files: bulk aligment and whitespace cleanup of assignmentsThomas De Schampheleire2014-10-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* packages: rename FOO_CONF_OPT into FOO_CONF_OPTSThomas De Schampheleire2014-10-041-13/+13
| | | | | | | | | | | | 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>
* python: renumber patchBaruch Siach2014-08-061-0/+0
| | | | | | | | 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>
OpenPOWER on IntegriCloud