1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-26 09:37:44 +02:00
Commit Graph

93 Commits

Author SHA1 Message Date
Alexandru Ardelean
6a8f1965a9 python: backport version 2.7.12 to CC
Fixes CVE-2016-5699
  https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-5699

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-11-21 15:14:11 +02:00
Jan Čermák
c4ca3f0bf2 python: add missing host build dependency on expat/host
Since 94f87dc1, host build of Python depends on expat installed in host
staging directory. However, pyexpat extension fails to build if expat
was not built and installed to staging dir before - adding host build
dependency should fix this.

Signed-off-by: Jan Čermák <jan.cermak@nic.cz>
2015-12-13 20:21:29 +02:00
Attila Lendvai
a28067d30d python: fix cross-compiling C++ modules.
Signed-off-by: Attila Lendvai <attila@lendvai.name>
2015-12-13 20:20:02 +02:00
Steven Barth
7b2c37067b python: add correct host expat
Signed-off-by: Steven Barth <steven@midlink.org>
2015-12-13 20:19:33 +02:00
Jan Čermák
7e6939bdc0 python: fix patch removing multiarch support for host python
Patch removing multiarch paths from build should be applied only when
Python is built for target, but not for host. When the paths are removed
during host build, host python throws some ugly errors when importing
some hashlib modules. Also it reports that modules crypt and nis failed
to build (tested on Ubuntu 14.04 host).

Signed-off-by: Jan Čermák <jan.cermak@nic.cz>
2015-12-13 20:08:45 +02:00
Jo-Philipp Wich
375b9aeee4 python: fix two build depend issues
Build depends must refer to the source package name, not the binary one,
therefore we need to use `bzip2` in order to enforce a build of libbz2.so.

Also make the host python build depend on the bzip2 host build in order to
ensure that host python is built with bzip2 support. We don't need a build
dependency for the target python as this already depends on +libbz2 through
python-light. That package dependency in turn implies a build dependency.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-24 09:56:53 +02:00
John Crispin
6d892fb2fa python: add dependency to bz2 host build
Signed-off-by: John Crispin <blogic@openwrt.org>
2015-10-01 14:04:15 +02:00
John Crispin
d32e986ef6 python: remove bz2 build dep
Revert "python: add dependency to bz2 host build"

This reverts commit da6d7b57f5.

Signed-off-by: John Crispin <blogic@openwrt.org>
2015-08-26 12:18:59 +02:00
John Crispin
da6d7b57f5 python: add dependency to bz2 host build
Signed-off-by: John Crispin <blogic@openwrt.org>
2015-08-22 01:12:58 +02:00
Alexandru Ardelean
1dc9306558 python: do not prefer ncursesw over ncurses
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-04-21 10:19:29 +03:00
Alexandru Ardelean
022fb434cf python: replace with libncursesw with libncurses
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-04-21 10:15:44 +03:00
Jan Čermák
a5d784de0b python: added configure args for distutils path detection
python-package.mk now defines (extends) CONFIGURE_ARGS that are
adjusting PREFIX and EXEC_PREFIX in distutils.sysconfig during
compilation. These variables are sometimes used by autotools to detect
path to Python header files. Adding these variables to python-package.mk
fixes compilation of legacy autotools-configured packages that already
include python-package.mk and do not overwrite CONFIGURE_ARGS.

Signed-off-by: Jan Čermák <jan.cermak@nic.cz>
Cc: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-03-16 10:41:33 +01:00
Alexandru Ardelean
d69d8ec0b9 python: refine packaging and split more modules into packages
Rule of thumb is: any Python file that is greater than 100kb
(or adds a dependency with which it adds more than 100 kb)
should be a pretty useful/commonly used lib to stay in `python-light`.
An example, is the Python IO lib, which summarized (Python source +
binary module) is over 200kb.

Also moved some files that should have been put into previously
existing packages before, and re-organized the packages a bit.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-03-13 18:39:08 +02:00
Alexandru Ardelean
01eff3fc59 python: fix conflicts between python-light & python-base
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-03-12 21:04:45 +02:00
Alexandru Ardelean
9c5af1f29c python: revert previous patch and add a filespec
Seems removing the PyPackage rule and/or adding dummy install rule
causes some issues inside the build-system, where the libpython2.7.so.1.0
is not seen by packages that depend on python.
Even though that libpython2.7.so.1.0 file is installed properly by `python-base`.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-03-11 11:27:40 +02:00
Alexandru Ardelean
ac311e9801 python: remove PyPackage rules for python package
Calling `PyPackage` will install some default install rules for
python packages that are not required for the `python` package specifically
are not required.
That will lead to some conflicts with `python-light` because the
`/usr/lib/python2.7/site-packages` folder (+contents) will be
available in both packages.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-03-09 16:52:52 +02:00
Alexandru Ardelean
c8c509bdad python: add patches to disable runtime lib dirs
When cross-compiling, we do not need to add runtime lib dirs.
Also, the cross compilers that are used on OpenWRT do not support
the '-R' option, which causes build failures.

These build failures existed before, but were not noticed,
because it fails only on some setups.
This is because Python's `setup.py` does a lot of voo-doo
automagic that needs handling for some cross-compilation cases.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-03-08 17:57:26 +02:00
Steven Barth
66331c6de2 Merge pull request #992 from commodo/python-patch-updates
python: patch updates
2015-03-06 15:29:30 +01:00
Alexandru Ardelean
0d072f2b42 python: packetize some python modules
Packetize some Python modules to reduce size of the overall Python package.
Basically, a new package is introduced, call `python-light`,
and everything that's extra (or big) is put in other packages.

The `python` package becomes a metapackage that installs `python-light`
along with the rest of the packages.

Base work started by Jan Čermák.

Signed-off-by: Jan Čermák <jan.cermak@nic.cz>
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-03-06 15:19:29 +02:00
Alexandru Ardelean
bb87de33dd python: add '_python_*' env vars to host python
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-03-06 14:18:45 +02:00
Alexandru Ardelean
2727b3fda3 python: add patch for distutils to add support for the '_python_sysroot' env var
Patch taken from buildroot:
  http://git.buildroot.net/buildroot/tree/package/python/python-008-distutils-use-python-sysroot.patch

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-03-06 11:16:48 +02:00
Alexandru Ardelean
8d6b503b4a python: re-number patches
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-03-06 11:11:18 +02:00
Steven Barth
056f0002b1 Merge pull request #962 from sairon/python-fix-distutils-adjusting-path
python: patch distutils adjusting path in scripts' shebang
2015-03-02 07:47:20 +01:00
Jan Čermák
71b696622a python: patch distutils adjusting path in scripts' shebang
When distutils are copying scripts, path to Python interpreter is adjusted.
This does not work well in OpenWrt buildroot, because the path is adjusted
to absolute path to host Python then. This patch simply disables the
adjusting of the path.

Signed-off-by: Jan Čermák <jan.cermak@nic.cz>
2015-02-27 18:11:19 +01:00
Alexandru Ardelean
7c4dac5118 python: reduce size of patch 130
Try to reduce the amount of change in this patch, since it removes
a lot of stuff, when we could just 'ifdef' that stuff out, with 2 lines.

The buildroot project does something similar like this:
http://git.buildroot.net/buildroot/tree/package/python/005-pyc-pyo-conditional.patch

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-02-27 18:11:22 +02:00
Jan Čermák
6f699463da python: removed ensurepip module
This module is not necessary in OpenWrt because the functionality it
provides (i.e. installation of setuptools and PIP) is ensured by
python-pip and python-setuptools packages.

See: https://docs.python.org/2.7/library/ensurepip.html

Signed-off-by: Jan Čermák <jan.cermak@nic.cz>
2015-02-24 18:33:29 +01:00
Steven Barth
f4e9c703b3 Revert "python: add patch to abort build on failed module build" 2015-02-20 09:33:41 +01:00
Alexandru Ardelean
999cc6a040 python: add patch to abort build on failed module build
Taken from buildroot:
  http://git.buildroot.net/buildroot/plain/package/python/014-abort-on-failed-modules.patch

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-02-19 16:00:04 +02:00
Alexandru Ardelean
705b381b5b python: add ncurses(w) include folders for host python
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-02-11 20:20:14 +02:00
Alexandru Ardelean
677ed22b3e python: fix goof
This should have gone in python3.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-01-20 10:45:09 +02:00
Alexandru Ardelean
8c057f39d8 python3: update using python updates as template
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-01-19 20:22:41 +02:00
Alexandru Ardelean
903432c91e python: add patch to remove Debian/Ubuntu multiarch support
Seems when cross compiling on x86_64 Debian (most likely Ubuntu too)
the host's paths will be added too causing build failures for some extensions.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-01-15 23:24:59 +02:00
Szilárd Pfeiffer
0394a1e286 python: Install .pc files from Python package.
Signed-off-by: Szilárd Pfeiffer <coroner@pfeifferszilard.hu>
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-01-11 20:15:13 +02:00
Alexandru Ardelean
b474e60d6d python: add patch to fix _ctypes build on certain X86_64 hosts
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-01-11 20:15:13 +02:00
Alexandru Ardelean
11fba7e6bd python: remove libffi/host; we're not using it
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-01-11 20:15:13 +02:00
Alexandru Ardelean
7123d31a0b python: enable pip installation of pip on the host-side
Python packs some pip installation script during the build,
which looks like a better idea to use for the python-pip
and/or python-setuptools packages.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-01-11 20:15:13 +02:00
Alexandru Ardelean
f5f8d83dcd python: change _PYTHON_HOST_PLATFORM to linux2
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-01-11 20:15:13 +02:00
Steven Barth
99e6f27075 Merge pull request #744 from commodo/python-upg-2.7.9
python: upgrade to version 2.7.9
2015-01-06 15:18:31 +01:00
Alexandru Ardelean
87c4cbff5c python: upgrade to version 2.7.9
Release notes here:
   https://www.python.org/downloads/release/python-279/

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-01-06 15:10:59 +02:00
Alexandru Ardelean
8b86c1528a python: add default PyPackage/filespec if not defined
Most packages will install in /usr/lib/python$(PYTHON_VERSION)/site-packages

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-01-06 14:15:02 +02:00
Alexandru Ardelean
9b94e3cb6e python: trim all whitespaces for the operator in the filespec
That would allow for files (in filespecs) to be indented.
As it is now, the files need to be added at the begginning of the line.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-01-06 10:50:31 +02:00
Xuefer
591af75d2e python: whitespace fix for PYTHONPATH
Seems that using += adds a space in the PYTHONPATH.
Could be some other error, but at least this way
it's sure to not leave any spaces.

Thanks @Xuefer.

Signed-off-by: Xuefer Tinys <xuefer@gmail.com>
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-01-06 10:50:31 +02:00
Gergely Kiss
fabb55271d python: fix file conflict between python and python-base packages
Signed-off-by: Gergely Kiss <mail.gery@gmail.com>
Tested-by: Gergely Kiss <mail.gery@gmail.com>
2014-12-15 15:26:41 +01:00
Alexandru Ardelean
97d7cff5d1 python: add $(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR) to PYTHONPATH
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-12-09 12:42:36 +02:00
Alexandru Ardelean
94b090cb9c python: use Build/Prepare rule for the config.site file
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-26 11:51:40 +02:00
Alexandru Ardelean
5b85eff6b2 python: add patch to disable python byte codes by default
Use export PYTHONDONTWRITEBYTECODE=0 to re-enable writing byte codes.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-16 23:31:59 +02:00
Alexandru Ardelean
ad9c57beae python: add distutils back (selectively)
This patch reduces distutils from 1.7 MB to 0.7 MB.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-12 23:45:39 +02:00
Alexandru Ardelean
8623c2942a python: update MAKE_FLAGS
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-12 23:24:30 +02:00
Alexandru Ardelean
a91a992abb python: add __PYENV_LAUNCHER__ env var
Mostly useful for setuptools and pip during build.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-09 21:08:08 +02:00
Alexandru Ardelean
a9ba2161bd python: remove readline.so for now
Some symbols are not found (tgetnum and BC).
Looks like the termcap lib, which should be in libncurses(w)
but maybe some build param would be required.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-09 20:16:25 +02:00