Commit graph

53 commits

Author SHA1 Message Date
Alexandru Ardelean
8dd0131439 python: upgrade to version 2.7.12
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-09-13 10:17:57 +03:00
Alexandru Ardelean
aa2baa2120 python: do not allow packaging of windows exe files
Thanks to @ryzhovau for reporting.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-06-27 15:31:12 +03:00
Alexandru Ardelean
eec85f0ce7 python: revert $(STAGING_DIR)/host to $(STAGING_DIR)/host change
Also, override all prefix args in the HOST_CONFIGURE_ARGS
so that this works fine on CC/15.05.
There are some changes in core regarding package builds that
require this.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-04-15 12:11:21 +03:00
Alexandru Ardelean
c8e8aae579 python: change $(STAGING_DIR)/host to $(STAGING_DIR_HOST)
It seems that this can become an issue.
Found when building python3-setuptools from packages/trunk
in openwrt/15.05.

python3-setuptools is not in packages/for-15.05

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-04-14 11:56:21 +03:00
Jeffery To
11d1b213c2 python: add rpath for host Python extension modules
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2016-03-13 00:50:12 +08:00
Jeffery To
b70b978cc6 python: use default host build prefix, remove cross-compile workarounds for host
The sets host Python's prefix and exec-prefix to the same value
($(STAGING_DIR)/host for packages, as currently defined in
include/host-build.mk), which avoids the case where pyconfig.h is
not in the same location as Python's other header files (see
https://bugs.python.org/issue896330).

This also removes some cross compilation workarounds
(_python_sysroot/prefix/exec_prefix, disabling byte-compilation,
__PYVENV_LAUNCHER__) that are not necessary when compiling packages
for host.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2016-03-05 02:30:12 +08:00
Jeffery To
2140d8f6d2 python: fix HOST_PYTHON_INC_DIR path
Host python moved in c5564133, this updates HOST_PYTHON_INC_DIR to
match.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2016-02-14 01:46:56 +08:00
Felix Fietkau
9f8e5aca34 treewide: use $(STAGING_DIR)/host instead of $(STAGING_DIR_HOST), sync with changes in trunk
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2016-01-20 21:56:03 +01:00
Jeffery To
94578145cd python: fixed _python_sysroot paths
AFAIK sysroot is combined with prefix/exec_prefix, so sysroot shouldn't
include "/usr". (cf. the HostPython function in older versions of
python-package.mk)

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2015-12-31 11:55:12 +08:00
Daniel Dickinson
83d992a8a9 lang/python: Make building additional (non-base) python modules easier
This adds code to make it easier to build third-party python
modules such as ones from PyPi.

Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
2015-12-18 17:15:36 -05:00
Hannu Nyman
298c826361 Merge pull request #2092 from cshore/pull-request-python-system-expat
lang/python: Depend on system expat
2015-12-16 10:23:57 +02:00
Alexandru Ardelean
65b388adbc python2: fix typo in HostPython function
I call this the curse of the End-Of-The-Year for me.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-12-13 14:56:45 +02:00
Alexandru Ardelean
fdde13be29 python: fix HostPython again
Tested on python-setuptools.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-12-12 14:51:50 +02:00
Alexandru Ardelean
779643e358 python: fix HostPython host/target selection
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-12-11 17:13:21 +02:00
Alexandru Ardelean
a8602a7ccb python: upgrade to version 2.7.11
And split python-dev and python-lib2to3 packages.
Seems for python3 this was done, so we'll sync here.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-12-11 16:07:22 +02:00
Alexandru Ardelean
c55641331e python: unify HostPython and HostHostPython functions
That means basically moving the host Python from $(STAGING_DIR_HOST)
to $(STAGING_DIR_HOST)/usr and making the PYTHONPATH var
as an argument.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-12-11 16:01:27 +02:00
Daniel Dickinson
9535b642a9 lang/python: Depend on system expat
Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
2015-12-09 21:21:47 -05:00
Jeffery To
b12d7b6db1 python: add capability to install python packages for the host
Some python packages (e.g. cffi) compile one or more shared libraries
as part of their setup process. When these packages are setup
dependencies of other packages (e.g. cryptography), these packages (and
their shared libraries) will need to be loaded on the host system.

This adds a makefile, similar to python-package.mk, to simplify
installing python packages on the host.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2015-11-24 22:43:56 +08:00
Attila Lendvai
2bb9f6b9c7 python: fix cross-compiling C++ modules.
Signed-off-by: Attila Lendvai <attila@lendvai.name>
2015-09-28 17:42:05 +00:00
Alexandru Ardelean
af89de58f5 python: upgrade to 2.7.10
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-05-27 19:52:49 +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
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
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
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
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
9e78aff770 python: add PKG_USE_MIPS16:=0 + handle CONFIG_USE_MIPS16
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-07 15:37:18 +02:00
Alexandru Ardelean
242286b80d python: add PYTHONPATH var; this allows packages to configure it
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-07 15:37:18 +02:00
Alexandru Ardelean
283b3597b7 python: add HOST_PYTHON_LIB_DIR variable to python-package.mk
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-07 15:37:18 +02:00
Nicolas Thill
cad9bdbc85 python, python3: fix python*-package.mk
Replace calls to getvar function recently removed

Signed-off-by: Nicolas Thill <nico@openwrt.org>
2014-10-23 22:57:02 +02:00
Alexandru Ardelean
0141057a59 python: add _PYTHON_HOST_PLATFORM env var when cross-compiling C extensions
This mostly helps to avoid confusion when modules are cross-compiled.
Otherwise build folders are named with the host's platform name.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-19 22:33:08 +03:00
Alexandru Ardelean
855ef2a530 python: add LD and LDSHARED env vars to Build/Compile/PyMod
Tells the host Python to use the target's linker.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-19 22:33:08 +03:00
Alexandru Ardelean
bfb286ff62 python: add PYTHON_INC_DIR var to CPPFLAGS
The target's PYTHON_INC_DIR should take precedence over the host's
include dir when cross-compiling.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-19 22:33:08 +03:00
Alexandru Ardelean
9415753544 python: export CC + CCSHARED env vars to cross-compile Python C extensions properly
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-19 22:33:08 +03:00
Alexandru Ardelean
8122954aff python: add ac_cv_buggy_getaddrinfo=no to config.site file
Required when IPv6 support gets enabled.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-17 16:39:26 +03:00
Alexandru Ardelean
09c02844e4 python: enforce the existence of files in the filespecs
Seems that this allows some goofs, because some files
silently do not get copied and the build succeeds, even though
it shouldn't.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-17 16:30:45 +03:00
Alexandru Ardelean
714b1247b7 python: reduce bloat by removing *.pyo and *.pyc files
Seems that if you add a package folder this would also
include the compiled python files which increases fw size.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-17 10:25:43 +03:00
Alexandru Ardelean
02ad9c1915 python: upgrade to version 2.7.8 2014-10-15 16:49:49 +03:00
Alexandru Ardelean
b49c17d6c7 python: enforce version assignment
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-15 10:02:49 +03:00
Alexandru Ardelean
3ad7208ba6 python: move python package versioning to python-package.mk
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-15 10:02:48 +03:00
Alexandru Ardelean
d5bd7dd36e python: add old python 2 package back
According to PEP394 (http://legacy.python.org/dev/peps/pep-0394/)
the 'python' command should refer to 'python2'.

In our case, this means we should reboot the old python package.

We could rename the package name to python2, but that would
just complicate things a bit with other packages, and
since we're doing this reboot, such a complication would be
unnecessary.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-15 10:02:33 +03:00
Agent 42
5e3393cf94 rename folder to python3 2014-10-13 12:20:34 +02:00