1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-16 20:33:58 +02:00
Commit Graph

329 Commits

Author SHA1 Message Date
Daniel Golle
7b53052f4e
pyodbc: assume SQL_C_WCHAR is native endian
Bump PKG_REV and remove obsolete PKG_MD5SUM while at it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-07-14 16:50:06 +02:00
Daniel Golle
80cd2bb8b7 python-yaml: update source and build for python3
Update source to version 3.12 and build for both, python and python3.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-07-14 15:59:13 +02:00
Hannu Nyman
3c29561888 Merge pull request #4558 from commodo/python-cleanup1
python,python3: rename PyBuild/Compile rules & remove .egg-info from packages
2017-07-09 21:04:38 +03:00
Daniel Golle
ac5ddd96e5 python-gnupg: add package
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-07-08 21:32:53 +02:00
Daniel Golle
1ae46e7de2 Merge pull request #4559 from commodo/python-pyodbc-fix
pyodbc: fix python-pyodbc variant ; wasn't working
2017-07-07 18:54:16 +02:00
Alexandru Ardelean
316b41e856 pyodbc: fix python-pyodbc variant ; wasn't working
Python3 variant was working fine.

Also add add PACKAGE_python-pyodbc conditional depend for python packages

Otherwise, both Python & Python3 interpreters get built,
even tho only one variant is selected.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-07-07 18:14:22 +03:00
Alexandru Ardelean
f9dddb6bb0 python-lxml: override PyBuild/Compile & Py3Build/Compile rules
And depend on python-light only if python-lxml is selected.
Same thing for python3-lxml.

Otherwise, this builds both Python & Python3 intepreters.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-07-07 18:07:10 +03:00
Alexandru Ardelean
4333d1dcbf python,python3: remove .egginfo directories
They don't seem needed, and makes packages a bit smaller

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-07-07 18:07:10 +03:00
Alexandru Ardelean
8db8c927ed python,python3: define PyBuild/Compile & Py3Build/Compile
Similar to LEDE/OpenWrt's Build/Compile/Default rule,
and other similarities like this.

This should allow Python packages to define
PyBuild/Compile rules to do specific stuff per
package.

The advantage of using these (over just overriding
Build/Compile) is the VARIANT mechanism that is
in place to support packaging both for Python & Python3.

So, PyBuild/Compile will get picked up for the Python
variant build, and Py3Build/Compile will get picked
up for the Python3 variant build.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-07-07 18:07:10 +03:00
Alexandru Ardelean
1588b532fb python: fix intermitent build failure
Fixes: https://github.com/openwrt/packages/issues/4548

When running parallel jobs, there are chances
that the Build/InstallDev rule may run before
the Host/Install rule and fail the build.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-07-06 16:49:27 +08:00
Alexandru Ardelean
3fa0c06d48 python,python3: add dependency on CONFIG_PACKAGE_ symbols for setuptools & pip
If you build python/python3 and later decide to build
python(3)-setuptools and/or python(3)-pip, the build won't
re-run without adding `CONFIG_PACKAGE_python(3)-setuptools`
and `CONFIG_PACKAGE_python(3)-pip`.

Seems to resolve issue:
https://github.com/openwrt/packages/issues/4529

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-07-03 16:11:57 +03:00
Alexandru Ardelean
a2b76b5403 python,python3: simplify sed expression for setuptools & pip
A suggestion from comment (from Philip Prindeville):
https://github.com/openwrt/packages/issues/4529#issuecomment-312518121

Avoids some escaping of slashes.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-07-03 16:11:52 +03:00
Alexandru Ardelean
1c54e2b0fb python,python3: fix underlinking issues with lrt (clock_gettime())
Seems it's called underlinking that's happening only
on Ubuntu 12.04 with libressl (that comes from LEDE's
tools folder).

Link here:
https://ubuntuforums.org/showthread.php?t=1870586

I'm still reading about this a bit.
Since I don't really get it.

But applying that fix (as in the link) seems to fix compiling
on Ubuntu 12.04, and tried also on 16.04 (to make sure).

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-07-03 09:28:41 +03:00
Daniel Golle
1aca235d44
python-pyodbc: add package
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-07-01 19:46:55 +02:00
Alexandru Ardelean
e88e35249f python,python3: install mk files in the Host/Install phase
The Build/InstallDev rule is activated only for target builds.
But if someone needs only the host Python, then
these files need to be installed in this phase, and not Build/InstallDev

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-06-29 14:04:09 +03:00
Alexandru Ardelean
7a79f2db79 python-six: rename PKG_NAME to python-six, and adapt unpack cmd for build
OVS has PKG_BUILD_DEPENDS:=python-six/host as dep.
But that doesn't seem to work, since the PKG_NAME:=six

So, this change renames the PKG_NAME to python-six, to
make it clear it's Python package.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-06-29 13:48:42 +03:00
Alexandru Ardelean
576c45eb0a python3: fix distutils path to package when using bytecodes
If there is only Python bytecodes, then
the __init__.py script will be concatenated, and
the __init__.pyc as well.

This is becase this bit `path = os.path.join(path, '__init__'+extension)`
is iterated twice.

This is a bug in Python3, also because we ship bytecodes
instead of source code [ with Python & Python3 ].
Python is not affected.

Reported-by: Mirko Vogt <mirko@nanl.de>
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-06-12 23:26:54 +03:00
Alexandru Ardelean
ff016a4802 python-lxml: add initial version (with python3 variant included)
This package requires libxml2 & libxslt to be built, has some
C code so it's not installable via pip.
It needs cross-compilation.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-06-05 18:00:24 +03:00
Alexandru Ardelean
c9337b2b92 python-six: add host-side build
Needed for Open vSwitch's python libs.
And build.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-05-24 23:07:05 +03:00
Alexandru Ardelean
0d54d05b6d python3-pip: override Package/python3-pip/install rule
This is in essence fixes pip3.

That means pip3 will ship without Python byte-codes
for a while, until I'll find a better way to fix it.

I couldn't think of a not-very hack-ish way of doing it.

The only draw-back of this, will be that pip3 will run
a bit slower ; but that should be ok for a while.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-05-19 17:28:08 +03:00
Alexandru Ardelean
a4691a289c python3: remove __pycache__ folders pip & setuptools
python3-pip & python3-setuptools have slightly
different installation mechanisms.

We need to remove the __pycache__ folders.
Seems they're generated.

This also reduces the size of the python3-pip &
python3-setuptools packages.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-05-19 17:27:48 +03:00
Alexandru Ardelean
b9d88065f5 python,python3: allow python packages to override Package/<pkg>/install rule
Python packages try to enforce their own.
For some cases this may not be desired.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-05-19 17:16:39 +03:00
Alexandru Ardelean
68312f49c0 python packages: move all things python under lang/python
I admit this may be be a bit aggressive, but the lang
folder is getting cluttered/filled up with Python, PHP, Perl,
Ruby, etc. packages.

Makes sense to try to group them into per-lang folders.

I took the Pythons.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-05-17 16:51:14 +03:00
Alexandru Ardelean
9f7235e42a python,python3: bump PKG_RELEASEs
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-03-09 18:43:50 +02:00
Alexandru Ardelean
20685f5220 python: split source packages away from compiled packages
Well, they're not yet compiled, but in the next commit
they should be.

People have been complaining [citation needed] to me
via email or via Github that Python's performance is crap
because it packages sources directly and they're not compiled.
And Python has to compile the sources on each run, and
on-the-fly.

Allowing compilation caching is also a no-no, because
I'll get complaints that the flash storage fills up
whenever a Python app runs.

So, to give the user a choice, the new de-facto packaging
for Python packages will be:
* ship compiled + [ preferably ] optimized files
* package sources separately

The problem is that this doubles the number of packages
in LEDE/OpenWrt, but build-times should not suffer a big
hit, since the compilation is done once, and the
install phase should not be too intensive.

Oh, and people don't need ship source packages if
they don't want to.
To do that, a packager needs to just call
`$(eval $(call BuildPackage,python-<package>-src))`

The `python-` prefix is important.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-03-09 18:43:41 +02:00
Alexandru Ardelean
05f8d6edf0 python,python3: drop remove .pyc & .pyo files
We'll control in the install phase what we ship [byte-codes or source files]

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-03-09 09:26:36 +02:00
Alexandru Ardelean
92073b047b python,python3: drop tests from all core packages
Well, this slipped by for some time.
This should make the Python core packages even more lighter.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-03-09 09:23:10 +02:00
Alexandru Ardelean
6c4dcf4446 python: fix python-dev clash with python-base
Both want to install libpython.so.
python-dev should install libpython.a

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-03-09 09:23:10 +02:00
Alexandru Ardelean
df0d0bcc00 python,python3: move PyPackage install rules in the beggining of the Package install rules
So that we can process Python sources installed
by those rules, if we need to.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-03-09 09:23:10 +02:00
Alexandru Ardelean
06c91a7ed8 python: move filespec shell code into file
Cleanup.
And preparation for adding a bit more functionality.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-03-09 09:23:10 +02:00
Alexandru Ardelean
17da988645 python,python3: fix goof with multiline command break
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-03-09 09:23:10 +02:00
Alexandru Ardelean
6bfd17e75c python: remove setupterm() redefinition
It's not 100% aligned with the ncurses' definition.

Reported-by: Arturo Rinaldi <arturo@arduino.org>
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-02-13 18:30:29 +02:00
Alexandru Ardelean
4772aec581 python,python3: override python setuptools & pip versions
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-02-09 16:31:16 +02:00
Alexandru Ardelean
31d614f92c python,python3: add python-pip-conf package to be used by both python-pip & python3-pip
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-23 11:59:50 +02:00
Alexandru Ardelean
a53d0c5a40 pip,setuptools: move as part of python,python3 build
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-23 10:20:20 +02:00
Alexandru Ardelean
80349f9e73 python,python3: install built-in pip and setuptools
Easier than using external package.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-23 09:06:51 +02:00
Matthias Schiffer
3823ef9bc4 Merge pull request #3813 from NeoRaider/hostpkg
Use STAGING_DIR_HOSTPKG where appropriate
2017-01-11 21:54:09 +01:00
Alexandru Ardelean
b5b6ef34f4 python: bump PKG_RELEASE to 3
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-11 15:16:27 +02:00
Alexandru Ardelean
8ca02842ae python: remove 011-do-not-prefer-ncursesw.patch
LEDE now provides libncursesw by default [even for libncurses].
No need to keep this patch around.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-11 15:16:27 +02:00
Alexandru Ardelean
4e2f4a76e3 python: use built-in libffi lib for host build
Python comes with it's own builtin libffi lib, which
seems easier to use for the host build, than trying
to use the one from the package feeds.

Also, dropping `005-fix-libffi-x86-64-configure.patch`
Not needed anymore.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-11 15:12:21 +02:00
Alexandru Ardelean
ee88853e04 python: link with static libs of ssl, crypto for host builds
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-11 15:12:20 +02:00
Alexandru Ardelean
515468346a Revert "python: don't use libressl for host build"
This reverts commit ca800e60b0.
2017-01-11 15:12:20 +02:00
Alexandru Ardelean
3bfdf6797b python: drop CFLAGS in HOST_CONFIGURE_ARGS ; it's already in HOST_CONFIGURE_VARS
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-11 15:12:19 +02:00
Alexandru Ardelean
ed5cd3e2ce python: remove Host/Install rule default add
I just found out that, that the BUILD_VARIANT var
is not set for the host build, so technically this code
would never get used.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-11 11:02:24 +02:00
Matthias Schiffer
4a984a8d60
treewide: replace $(STAGING_DIR)/host and $(HOST_BUILD_PREFIX) with $(STAGING_DIR_HOSTPKG)
As both LEDE and OpenWrt have STAGING_DIR_HOSTPKG now, we can start to rely
on it. See 73b7f55424 for more information on
STAGING_DIR_HOSTPKG.

STAGING_DIR_HOSTPKG won't actually be changed before the first LEDE release
(it is equivalent to $(STAGING_DIR)/host), so this simple search/replace
cleanup is safe to apply. Doing this cleanup now will be useful for the
Gluon project (an OpenWrt/LEDE based firmware framework) for experimenting
with modifying STAGING_DIR_HOSTPKG before doing this in the LEDE upstream.

Also fixes a typo in the dbus Makefile ("STAGIND_DIR").

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-01-10 18:25:54 +01:00
Matthias Schiffer
876d139c98
python{,3}: remove STAGING_DIR_HOSTPKG fallback definition
STAGING_DIR_HOSTPKG is now defined in both OpenWrt and LEDE, so we can
start to rely on it.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-01-10 02:24:29 +01:00
Alexandru Ardelean
ca800e60b0 python: don't use libressl for host build
Fixes: https://github.com/openwrt/packages/issues/3767

Since commit:
f6e6341d89

libressl is built on the host-side.

Python picks it up [ via the openssl/* headers ] and assumes
it has SSL libs.
Compiling works fine, linking fails.
Doesn't look like it's because:
2fd5ce9488

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-06 15:29:21 +02:00
Alexandru Ardelean
f04641d3d1 python: upgrade to version 2.7.13
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-04 15:08:45 +02:00
Alexandru Ardelean
6d9137048b python: simplify/unify default build rules for python packages
Most python packages use the same build rules & vars.
So, adding them in python-package.mk.

Also, preparing for using VARIANTs for python/python3 packages.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-04 15:08:37 +02:00
Alexandru Ardelean
bb2f8fa8ed python-dev: add python-lib2to3 as dependency
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-04 15:08:37 +02:00
Alexandru Ardelean
165cd9f96a python: update PYTHON_FOR_BUILD (based on python3)
PYTHON_FOR_BUILD is used to build the target python.
Nomally Python scripts detect fine the Python host interpreter
to use for building the Python target interpreter.
But, let's not leave it up to chance anymore.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-04 15:08:36 +02:00
Alexandru Ardelean
9d876738b2 python: remove argument for --with-system-ffi configure arg (based on python3)
And apparently `--with-system-ffi` does not take any arguments.
But it's only in Python 3.6 that a check was added for that.
After checking, Python 2.7 does not take any args either
for `--with-system-ffi` ; so, remove it [for the case when this
change may get backported].

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-04 15:08:36 +02:00
Jo-Philipp Wich
49cf5815e3 python: move includes after common package variables
Move the python-host.mk and python-package.mk includes after the definition of
common package variables. This is required to ensure that PKG_UNPACK is not set
to to the dummy "true" command which happens if PKG_SOURCE is not yet set.

Fixes the following error observed while attempting to build Python on a recent
LEDE version:

    make[2]: Entering directory '.../lang/python'
    true
    [ ! -d ./src/ ] || cp -fpR ./src/* .../Python-2.7.12

    Applying ./patches/001-enable-zlib.patch using plaintext:
    can't find file to patch at input line 14
    Perhaps you used the wrong -p or --strip option?
    [...]
    Patch failed!  Please fix ./patches/001-enable-zlib.patch!
    Makefile:242: recipe for target '.../Python-2.7.12/.prepared_...' failed

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-12-16 03:24:19 +01:00
Alexandru Ardelean
9eca45fdf1 python, python3: unify HOST_ vars and get rid of HOST_CFLAGS
--sysconfigdir and --sbindir are obtained from --prefix
and --exec-prefix, so no need to have them explicitly

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-11-07 10:55:34 +02:00
Alexandru Ardelean
7d89234b86 python,python3: get rid of HOST_CFLAGS
They rely on system paths and are a bit misleading/confusing.
As seen here:
https://github.com/openwrt/packages/issues/3339

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-11-07 10:55:33 +02:00
Alexandru Ardelean
6a670f42b1 python: move PYTHON_VERSION in own .mk file
Allows for more granularity with respect to python-host.mk
and python-package.mk inclusions.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-11-07 10:55:31 +02:00
Alexandru Ardelean
45bdb70e1e python: add include guard for python-host.mk and include in Makefile
So that it can be included twice.
python-package.mk include python-host.mk, but at some point
in time python-host.mk is not exported to staging_dir yet.

So, to have in python's Makefile, we need to include it
in the Makefile, and to prevent double inclusion (if
python-host.mk is exported from a previous build), the
include guard is added.

Also, moved the includes after some vars were set.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-11-07 09:27:20 +02:00
Jo-Philipp Wich
73b7f55424 python: avoid use of HOST_BUILD_PREFIX
Currently, the python-host.mk framework relies on HOST_BUILD_PREFIX to
refer to the $(STAGING_DIR)/host directory but using the HOST_BUILD_PREFIX
variable requires the use of include/host-build.mk which in turn includes
python-host.mk, leading to target redefinition errors.

In order to provide a global, uniform way to refer to the host staging
directory, LEDE introduced a new variable STAGING_DIR_HOSTPKG which points
to $(STAGING_DIR)/host for now with the purpose of eventually being able to
relocate that directory in the future.

This commit changes python-host.mk to ...
 - stop including include/host-build.mk (revert of #3423)
 - replace usages of $(HOST_BUILD_PREFIX) with $(STAGING_DIR_HOSTPKG)
 - warn and fallback to $(STAGING_DIR)/host if STAGING_DIR_HOSTPKG is
   unavailable

The fallback code will ensure that the python host build infrastructure
continues to work properly on older OpenWrt and LEDE versions until the
STAGING_DIR_HOSTPKG is fully settled in and can be removed some time
in the future.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-11-01 12:57:36 +01:00
Alexandru Ardelean
e54d296a53 python,python3: include host-build.mk in python-host.mk & python3-package.mk
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-10-31 09:51:34 +02:00
Hannu Nyman
265f9595ed Merge pull request #3297 from NeoRaider/python
python, python3, python-*: use default prefix for host install
2016-10-27 16:43:15 +03:00
Yousong Zhou
fbba266e79 python: introduce Build/Compile/HostPyRun{Host,Target}
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2016-10-17 19:55:39 +08:00
Matthias Schiffer
205ee41506
python, python-*: use default prefix for host install
Also fixes a few incorrect "$(STAGING_DIR_HOST)/host" paths.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2016-10-04 00:59:37 +02:00
Alexandru Ardelean
a4b0c0a9fb python: disable with-ensurepip option for host build
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-09-21 16:44:02 +03:00
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
Hannu Nyman
65ee7df96b python: bump PKG_RELEASE
Bump PKG_RELEASE of python 2.7.11 after the recent fixes.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2016-03-15 13:55:43 +02: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
Hannu Nyman
56688f68fd Merge pull request #2463 from jefferyto/host-python-with-system-ffi
python: use external libffi for host python
2016-03-06 20:25:19 +02:00
Jeffery To
4e3ae81b0c python: use external libffi for host python
This will ensure that ctypes will use the same version of libffi as
other packages, e.g. python-cffi.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2016-03-06 19:09:13 +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
Hannu Nyman
2e3fb832fc python: bump PKG_RELEASE
Bump PKG_RELEASE of python 2.7.11 as there have been several fixes
since the initial release.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-12-13 17:13:19 +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
015adc9b7a python: fix upgrade 2.7.11 goof
Seems those pkgconfig file paths were revealed to be incorrect
after doing a full clean build.
And I only had to inspiration to do one after doing the initial PR.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-12-11 16:49:45 +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
Alexandru Ardelean
8054747a49 python: remove newline function; it's also in OpenWRT core
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2015-12-11 15:30:32 +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
Steven Barth
dbde5d5295 Merge pull request #1984 from jefferyto/host-python-package
python: add capability to install python packages for the host
2015-11-24 15:50:34 +01: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
Jan Čermák
3ac990447f 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-11-23 21:59:29 +01:00
Jo-Philipp Wich
99484ec990 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-23 14:29:41 +02: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
John Crispin
e461e7dda9 python: add dependency to bz2 host build
Signed-off-by: John Crispin <blogic@openwrt.org>
2015-08-22 01:11:29 +02:00
Steven Barth
94f87dc1e1 python: add correct host expat
Signed-off-by: Steven Barth <steven@midlink.org>
2015-08-03 08:02:59 +02:00
Jan Čermák
73244f09ec 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-07-02 18:19:09 +02: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
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
Alexandru Ardelean
4f0f05f92b python: add some Build/InstallDev rules back
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-09 17:56:45 +02:00
Alexandru Ardelean
dd4cca5d26 python: add OPT and CONFIG_SITE vars to HOST_CONFIGURE_ARGS
Fixes some build issues.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-09 17:32:23 +02:00
Alexandru Ardelean
efcfca9631 python: add lib deps
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-09 17:32:17 +02:00
Alexandru Ardelean
cbc39a176f python: final switch
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-09 11:09:10 +02:00
Alexandru Ardelean
c3cd970570 python: exclude pdb.doc and webbrowser.py
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-07 16:50:30 +02:00
Alexandru Ardelean
3cd31a4633 python: remove +libcrypto dep; that's a openssl lib
Signed-off-by: Alexandru Ardelean <ardeleanalex.com>
2014-11-07 15:37:18 +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
Alexandru Ardelean
38a72bab1f python: cleanup Build/InstallDev rule
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-07 15:37:17 +02:00
Alexandru Ardelean
7a689890eb python: remove --without-ensurepip; not needed anymore
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-07 15:37:17 +02:00
Alexandru Ardelean
0ea587ad24 python: remove explicit rules in favor of using make/configure vars
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-07 15:37:17 +02:00
Alexandru Ardelean
7be9485564 python: reboot all python packages
Redefine python-full as all-pages-minus-a-few-that-don't make sense.
Remove all other packages.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-11-07 15:37:12 +02:00
Alexandru Ardelean
ab0232eebe python: add _sysconfigdata.py to python base package
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-25 15:01:49 +03: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
f699a1f8f9 python: fix source folder for libpython
This fix is quite critical since it fixes copying the libpython shared lib.
The previous source folder we've used is ok, it has the shared lib,
but libpython2.7.so is not a symlink of libpython2.7.so.1.0, but
rather a copy of it.
Which means that libpython2.7.so takes twice as much space
on the target's flash.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-20 19:07:28 +03:00
Alexandru Ardelean
820278a0c8 python: use libncursesw instead of libncurses
Python's build scripts prefer ncursesw, and if it is detected
it will be used.
The problem will occur when linking, since ncursesw libs may not be
installed if not added as deps, but the sources will be compiled
against ncursesw.

Reference from Python's HISTORY file:
  Patch #1428494: Prefer linking against ncursesw over ncurses library.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-19 22:41:57 +03: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
a1f86a6870 python: enable shared python lib; make this the norm
This will reduce the bloat when users will want to compile in their
Python C extensions.
There will be a initial bloat (several kb) if just Python
is installed, but that will be compensated when users will add more
C extensions.

During the build we also have to add Python's PKG_BUILD_DIR
so that the shared lib is found when compiling Python's
built-in C extensions.

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
6521cc7ed7 python: do not install pyconfig.h on the target
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
6862f1d8e6 python: add libopenssl and libcrypto as package deps
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-17 17:11:51 +03:00
Alexandru Ardelean
15111b3ccf python: _md5 + _sha libs are now grouped under _hashlibs
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-17 17:05:56 +03:00
Alexandru Ardelean
d05c846e69 python: add patch to disable package compiles/tests during cross-builts
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-17 17:05:43 +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
aafbac886e python: patch setup.py so that it does not include system include dirs
Seems that the Python C extensions were being
(or at least trying to be) build using '/usr/include' as the first
include folder.

Seems this issue was already fixed on MacOS X and now we've extended
it for our case.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-17 16:34:15 +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
e3145e1fb0 python: add python2 symlink to python as per PEP394 2014-10-15 10:02:57 +03:00
Alexandru Ardelean
b0c21ae7aa python: use command instead of 'ln -sf' 2014-10-15 10:02:57 +03:00
Alexandru Ardelean
9cdea1ba38 python: include python*-package.mk irespective of DUMP env var
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-15 10:02:54 +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
Alexandru Ardelean
4ed312143a python: reset packages and start off with minimal python
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-06 21:07:37 +03:00
Alexandru Ardelean
7bf1ae65a8 python: upgrade to version 3.4.1
Some notes:
- Python 3 (at least version 3.4) is pretty cross-compiler-friendly,
  so a lot of patches were thrown away.
- Arguments below were moved to ./files/config.site file, and disabled
      ac_cv_have_chflags=no \
      ac_cv_have_lchflags=no \
      ac_cv_py_format_size_t=no \
      ac_cv_have_long_long_format=yes \
      ac_cv_buggy_getaddrinfo=no \
- --without-ensurepip added, because the build wants to ensure that
  it works; that's a good idea, but for now, it requires special
  setup, and we can do that later
- --without-pymalloc added, becase in Python 3, modules are suffixed
  with m; e.g. so some paths are python3.4m instead of python3.4
  all this is detailed here:
         http://legacy.python.org/dev/peps/pep-3149/
  Maybe it will be a good idea to re-add this back

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-06 21:07:31 +03:00
Alexandru Ardelean
da85f0770a python: reorganize package
Make python-mini the top-level and default Python package.
Make the other packages subpackages of the top-level python package.
Make old python package the python-full package.

Note: at this point, this package can be split/renamed to
python-legacy should anyone need Python 2. After this commit
it's going to be Python 3 all the way.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-06 17:34:28 +03:00
Alexandru Ardelean
1472a35f36 python: update copyright & maintainer
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-06 17:31:23 +03:00
Alexandru Ardelean
0169d40b81 python: import package as-is from old packages
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2014-10-06 17:31:23 +03:00