summaryrefslogtreecommitdiff
path: root/lang/python3
diff options
context:
space:
mode:
authoraTanW <villy@sft.ru>2015-06-28 17:58:00 +0300
committeraTanW <villy@sft.ru>2015-06-28 17:58:00 +0300
commitf60ca0b30f92dea792e776db08d7f109c172be58 (patch)
tree5e200b2eb9bbd074e79d68014339dc823ac2db56 /lang/python3
parent2564e407d26d45ecc68befa7a3d1786dbb5982b5 (diff)
parent9d423ba553041b5d45918b6ebd8677e43990cb88 (diff)
Merge https://github.com/openwrt/packages
Conflicts: net/ipsec-tools/Makefile
Diffstat (limited to 'lang/python3')
-rw-r--r--lang/python3/Makefile101
-rw-r--r--lang/python3/files/python3-package-asyncio.mk16
-rw-r--r--lang/python3/files/python3-package-codecs.mk22
-rw-r--r--lang/python3/files/python3-package-ctypes.mk18
-rw-r--r--lang/python3/files/python3-package-dbm.mk17
-rw-r--r--lang/python3/files/python3-package-decimal.mk17
-rw-r--r--lang/python3/files/python3-package-distutils.mk16
-rw-r--r--lang/python3/files/python3-package-email.mk16
-rw-r--r--lang/python3/files/python3-package-gdbm.mk16
-rw-r--r--lang/python3/files/python3-package-logging.mk16
-rw-r--r--lang/python3/files/python3-package-lzma.mk17
-rw-r--r--lang/python3/files/python3-package-multiprocessing.mk17
-rw-r--r--lang/python3/files/python3-package-ncurses.mk18
-rw-r--r--lang/python3/files/python3-package-openssl.mk17
-rw-r--r--lang/python3/files/python3-package-pydoc.mk18
-rw-r--r--lang/python3/files/python3-package-sqlite3.mk17
-rw-r--r--lang/python3/files/python3-package-unittest.mk16
-rw-r--r--lang/python3/files/python3-package-xml.mk19
-rw-r--r--lang/python3/files/python3-package.mk2
-rw-r--r--lang/python3/patches/001-enable-zlib.patch (renamed from lang/python3/patches/110-enable-zlib.patch)0
-rw-r--r--lang/python3/patches/002-do-not-add-include-dirs-when-cross-compiling.patch (renamed from lang/python3/patches/120-do-not-add-include-dirs-when-cross-compiling.patch)0
-rw-r--r--lang/python3/patches/003-do-not-run-distutils-tests.patch (renamed from lang/python3/patches/130-do-not-run-distutils-tests.patch)0
-rw-r--r--lang/python3/patches/004-do-not-write-bytes-codes.patch (renamed from lang/python3/patches/140-do-not-write-bytes-codes.patch)0
-rw-r--r--lang/python3/patches/005-fix-libffi-x86-64-configure.patch31
-rw-r--r--lang/python3/patches/006-remove-debian-multiarch-support.patch12
-rw-r--r--lang/python3/patches/007-distutils-do-not-adjust-path.patch10
-rw-r--r--lang/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch15
-rw-r--r--lang/python3/patches/011-do-not-prefer-ncursesw.patch15
28 files changed, 457 insertions, 22 deletions
diff --git a/lang/python3/Makefile b/lang/python3/Makefile
index d13a9f4da..b9d29aab2 100644
--- a/lang/python3/Makefile
+++ b/lang/python3/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -14,12 +14,12 @@ PYTHON_VERSION:=$(PYTHON3_VERSION)
PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
PKG_NAME:=python3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PKG_VERSION)
-PKG_MD5SUM:=36fc7327c02c6f12fa24fc9ba78039e3
+PKG_MD5SUM:=7d092d1bba6e17f0d9bd21b49e441dd5
PKG_LICENSE:=PSF
PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
@@ -57,7 +57,7 @@ endef
define Package/python3-base
$(call Package/python3/Default)
TITLE:=Python $(PYTHON_VERSION) interpreter
- DEPENDS:=+libpthread +zlib +libffi +libopenssl
+ DEPENDS:=+libpthread +zlib
endef
define Package/python3-base/description
@@ -65,13 +65,45 @@ define Package/python3-base/description
for the interpreter to start.
endef
+define Package/python3-light
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON_VERSION) light installation
+ DEPENDS:=+python3-base +libffi +libbz2
+endef
+
+define Package/python3-light/description
+ This package is essentially the python3-base package plus
+ a few of the rarely used (and big) libraries stripped out
+ into separate packages.
+endef
+
+# Define newline here, since it's not defined in OpenWRT
+define newline
+
+
+endef
+
+PYTHON3_LIB_FILES_DEL:=
+PYTHON3_PACKAGES:=
+PYTHON3_SO_SUFFIX:=cpython-34.so
+define Py3BasePackage
+ PYTHON3_PACKAGES+=$(1)
+ PYTHON3_LIB_FILES_DEL+=$(2)
+ define Py3Package/$(1)/filespec
+ $(subst $(space),$(newline),$(foreach lib_file,$(2),+|$(lib_file)))
+ endef
+endef
+
+include ./files/python3-package-*.mk
+
define Package/python3
$(call Package/python3/Default)
- DEPENDS:=+python3-base +libncursesw +libbz2 +libgdbm +libsqlite3 +libdb47
+ DEPENDS:=+python3-light $(foreach package,$(PYTHON3_PACKAGES),+$(package))
endef
define Package/python3/description
This package contains the (almost) full Python install.
+ It's python3-light + all other packages.
endef
MAKE_FLAGS+=\
@@ -79,6 +111,10 @@ MAKE_FLAGS+=\
LD="$(TARGET_CC)" \
PGEN=pgen3
+ifeq ($(ARCH),i386)
+MAKE_FLAGS+=PYTHON_DECIMAL_WITH_MACHINE=ansi32
+endif
+
EXTRA_CFLAGS+= \
-DNDEBUG -fno-inline
EXTRA_LDFLAGS+= \
@@ -123,29 +159,35 @@ define Build/InstallDev
$(1)/usr/lib/python$(PYTHON_VERSION)/
endef
+PYTHON3_BASE_LIB_FILES:= \
+ /usr/lib/python$(PYTHON_VERSION)/encodings \
+ /usr/lib/python$(PYTHON_VERSION)/_collections_abc.py \
+ /usr/lib/python$(PYTHON_VERSION)/_sitebuiltins.py \
+ /usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py \
+ /usr/lib/python$(PYTHON_VERSION)/_weakrefset.py \
+ /usr/lib/python$(PYTHON_VERSION)/abc.py \
+ /usr/lib/python$(PYTHON_VERSION)/codecs.py \
+ /usr/lib/python$(PYTHON_VERSION)/genericpath.py \
+ /usr/lib/python$(PYTHON_VERSION)/io.py \
+ /usr/lib/python$(PYTHON_VERSION)/os.py \
+ /usr/lib/python$(PYTHON_VERSION)/posixpath.py \
+ /usr/lib/python$(PYTHON_VERSION)/site.py \
+ /usr/lib/python$(PYTHON_VERSION)/sysconfig.py \
+ /usr/lib/python$(PYTHON_VERSION)/stat.py
+
+PYTHON3_LIB_FILES_DEL+=$(PYTHON3_BASE_LIB_FILES)
+
define Py3Package/python3-base/filespec
+|/usr/bin/python$(PYTHON_VERSION)
-+|/usr/lib/python$(PYTHON_VERSION)/encodings
-+|/usr/lib/python$(PYTHON_VERSION)/_collections_abc.py
-+|/usr/lib/python$(PYTHON_VERSION)/_sitebuiltins.py
-+|/usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py
-+|/usr/lib/python$(PYTHON_VERSION)/_weakrefset.py
-+|/usr/lib/python$(PYTHON_VERSION)/abc.py
-+|/usr/lib/python$(PYTHON_VERSION)/codecs.py
-+|/usr/lib/python$(PYTHON_VERSION)/genericpath.py
-+|/usr/lib/python$(PYTHON_VERSION)/io.py
-+|/usr/lib/python$(PYTHON_VERSION)/os.py
-+|/usr/lib/python$(PYTHON_VERSION)/posixpath.py
-+|/usr/lib/python$(PYTHON_VERSION)/site.py
-+|/usr/lib/python$(PYTHON_VERSION)/sysconfig.py
-+|/usr/lib/python$(PYTHON_VERSION)/stat.py
+$(subst $(space),$(newline),$(foreach lib_file,$(PYTHON3_BASE_LIB_FILES),+|$(lib_file)))
endef
-define Py3Package/python3/filespec
+define Py3Package/python3-light/filespec
+|/usr/lib/python$(PYTHON_VERSION)
-|/usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION)
-|/usr/lib/python$(PYTHON_VERSION)/distutils/cygwinccompiler.py
-|/usr/lib/python$(PYTHON_VERSION)/distutils/command/wininst*
+-|/usr/lib/python$(PYTHON_VERSION)/ensurepip
-|/usr/lib/python$(PYTHON_VERSION)/idlelib
-|/usr/lib/python$(PYTHON_VERSION)/lib2to3
-|/usr/lib/python$(PYTHON_VERSION)/tkinter
@@ -157,6 +199,8 @@ define Py3Package/python3/filespec
-|/usr/lib/python$(PYTHON_VERSION)/webbrowser.py
-|/usr/lib/python$(PYTHON_VERSION)/*/test
-|/usr/lib/python$(PYTHON_VERSION)/*/tests
+-|/usr/lib/python$(PYTHON_VERSION)/_osx_support.py
+$(subst $(space),$(newline),$(foreach lib_file,$(PYTHON3_LIB_FILES_DEL),-|$(lib_file)))
endef
define Py3Package/python3-base/install
@@ -167,6 +211,14 @@ define Py3Package/python3-base/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* $(1)/usr/lib/
endef
+define Py3Package/python3/filespec
+-|$(PYTHON3_PKG_DIR)
+endef
+
+HOST_CFLAGS+= \
+ -I/usr/include/ncursesw \
+ -I/usr/include/ncurses
+
HOST_CONFIGURE_ARGS+= \
--without-cxx-main \
--without-pymalloc \
@@ -174,7 +226,7 @@ HOST_CONFIGURE_ARGS+= \
--prefix=$(STAGING_DIR_HOST) \
--with-ensurepip=upgrade \
CONFIG_SITE= \
- OPT="$(HOST_CFLAGS)"
+ CFLAGS="$(HOST_CFLAGS)"
define Host/Compile
+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) python Parser/pgen
@@ -189,8 +241,15 @@ endef
$(eval $(call HostBuild))
+$(foreach package, $(PYTHON3_PACKAGES), \
+ $(eval $(call Py3Package,$(package))) \
+ $(eval $(call BuildPackage,$(package))) \
+)
+
$(eval $(call Py3Package,python3-base))
+$(eval $(call Py3Package,python3-light))
$(eval $(call Py3Package,python3))
$(eval $(call BuildPackage,python3-base))
+$(eval $(call BuildPackage,python3-light))
$(eval $(call BuildPackage,python3))
diff --git a/lang/python3/files/python3-package-asyncio.mk b/lang/python3/files/python3-package-asyncio.mk
new file mode 100644
index 000000000..1d2faab3f
--- /dev/null
+++ b/lang/python3/files/python3-package-asyncio.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-asyncio
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) asyncio module
+ DEPENDS:=+python3-light
+endef
+
+$(eval $(call Py3BasePackage,python3-asyncio, \
+ /usr/lib/python$(PYTHON3_VERSION)/asyncio \
+))
diff --git a/lang/python3/files/python3-package-codecs.mk b/lang/python3/files/python3-package-codecs.mk
new file mode 100644
index 000000000..66101e1fb
--- /dev/null
+++ b/lang/python3/files/python3-package-codecs.mk
@@ -0,0 +1,22 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-codecs
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) codecs + unicode support
+ DEPENDS:=+python3-light
+endef
+
+$(eval $(call Py3BasePackage,python3-codecs, \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_codecs_cn.$(PYTHON3_SO_SUFFIX) \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_codecs_hk.$(PYTHON3_SO_SUFFIX) \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_codecs_iso2022.$(PYTHON3_SO_SUFFIX) \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_codecs_jp.$(PYTHON3_SO_SUFFIX) \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_codecs_kr.$(PYTHON3_SO_SUFFIX) \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_codecs_tw.$(PYTHON3_SO_SUFFIX) \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/unicodedata.$(PYTHON3_SO_SUFFIX) \
+))
diff --git a/lang/python3/files/python3-package-ctypes.mk b/lang/python3/files/python3-package-ctypes.mk
new file mode 100644
index 000000000..97c2c768a
--- /dev/null
+++ b/lang/python3/files/python3-package-ctypes.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-ctypes
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) ctypes module
+ DEPENDS:=+python3-light
+endef
+
+$(eval $(call Py3BasePackage,python3-ctypes, \
+ /usr/lib/python$(PYTHON3_VERSION)/ctypes \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_ctypes.$(PYTHON3_SO_SUFFIX) \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_ctypes_test.$(PYTHON3_SO_SUFFIX) \
+))
diff --git a/lang/python3/files/python3-package-dbm.mk b/lang/python3/files/python3-package-dbm.mk
new file mode 100644
index 000000000..ed343d81a
--- /dev/null
+++ b/lang/python3/files/python3-package-dbm.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-dbm
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) dbm module
+ DEPENDS:=+python3-light +libdb47
+endef
+
+$(eval $(call Py3BasePackage,python3-dbm, \
+ /usr/lib/python$(PYTHON3_VERSION)/dbm \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_dbm.$(PYTHON3_SO_SUFFIX) \
+))
diff --git a/lang/python3/files/python3-package-decimal.mk b/lang/python3/files/python3-package-decimal.mk
new file mode 100644
index 000000000..81ecbb0d4
--- /dev/null
+++ b/lang/python3/files/python3-package-decimal.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-decimal
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) decimal module
+ DEPENDS:=+python3-light
+endef
+
+$(eval $(call Py3BasePackage,python3-decimal, \
+ /usr/lib/python$(PYTHON3_VERSION)/decimal.py \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_decimal.$(PYTHON3_SO_SUFFIX) \
+))
diff --git a/lang/python3/files/python3-package-distutils.mk b/lang/python3/files/python3-package-distutils.mk
new file mode 100644
index 000000000..65f4b5aa6
--- /dev/null
+++ b/lang/python3/files/python3-package-distutils.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-distutils
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) distutils module
+ DEPENDS:=+python3-light
+endef
+
+$(eval $(call Py3BasePackage,python3-distutils, \
+ /usr/lib/python$(PYTHON3_VERSION)/distutils \
+))
diff --git a/lang/python3/files/python3-package-email.mk b/lang/python3/files/python3-package-email.mk
new file mode 100644
index 000000000..dae351979
--- /dev/null
+++ b/lang/python3/files/python3-package-email.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-email
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) email module
+ DEPENDS:=+python3-light
+endef
+
+$(eval $(call Py3BasePackage,python3-email, \
+ /usr/lib/python$(PYTHON3_VERSION)/email \
+))
diff --git a/lang/python3/files/python3-package-gdbm.mk b/lang/python3/files/python3-package-gdbm.mk
new file mode 100644
index 000000000..cc929132c
--- /dev/null
+++ b/lang/python3/files/python3-package-gdbm.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-gdbm
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) gdbm module
+ DEPENDS:=+python3-light +libgdbm
+endef
+
+$(eval $(call Py3BasePackage,python3-gdbm, \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_gdbm.$(PYTHON3_SO_SUFFIX) \
+))
diff --git a/lang/python3/files/python3-package-logging.mk b/lang/python3/files/python3-package-logging.mk
new file mode 100644
index 000000000..4cd6ea979
--- /dev/null
+++ b/lang/python3/files/python3-package-logging.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-logging
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) logging module
+ DEPENDS:=+python3-light
+endef
+
+$(eval $(call Py3BasePackage,python3-logging, \
+ /usr/lib/python$(PYTHON3_VERSION)/logging \
+))
diff --git a/lang/python3/files/python3-package-lzma.mk b/lang/python3/files/python3-package-lzma.mk
new file mode 100644
index 000000000..b04f072f9
--- /dev/null
+++ b/lang/python3/files/python3-package-lzma.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-lzma
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) lzma module
+ DEPENDS:=+python3-light +liblzma
+endef
+
+$(eval $(call Py3BasePackage,python3-lzma, \
+ /usr/lib/python$(PYTHON3_VERSION)/lzma.py \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_lzma.$(PYTHON3_SO_SUFFIX) \
+))
diff --git a/lang/python3/files/python3-package-multiprocessing.mk b/lang/python3/files/python3-package-multiprocessing.mk
new file mode 100644
index 000000000..784aabb8b
--- /dev/null
+++ b/lang/python3/files/python3-package-multiprocessing.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-multiprocessing
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) multiprocessing
+ DEPENDS:=+python3-light
+endef
+
+$(eval $(call Py3BasePackage,python3-multiprocessing, \
+ /usr/lib/python$(PYTHON3_VERSION)/multiprocessing \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_multiprocessing.$(PYTHON3_SO_SUFFIX) \
+))
diff --git a/lang/python3/files/python3-package-ncurses.mk b/lang/python3/files/python3-package-ncurses.mk
new file mode 100644
index 000000000..7e703b3dd
--- /dev/null
+++ b/lang/python3/files/python3-package-ncurses.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-ncurses
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) ncurses module
+ DEPENDS:=+python3-light +libncurses
+endef
+
+$(eval $(call Py3BasePackage,python3-ncurses, \
+ /usr/lib/python$(PYTHON3_VERSION)/curses \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_curses.$(PYTHON3_SO_SUFFIX) \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_curses_panel.$(PYTHON3_SO_SUFFIX) \
+))
diff --git a/lang/python3/files/python3-package-openssl.mk b/lang/python3/files/python3-package-openssl.mk
new file mode 100644
index 000000000..255d58099
--- /dev/null
+++ b/lang/python3/files/python3-package-openssl.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-openssl
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) SSL module
+ DEPENDS:=+python3-light +libopenssl
+endef
+
+$(eval $(call Py3BasePackage,python3-openssl, \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_hashlib.$(PYTHON3_SO_SUFFIX) \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_ssl.$(PYTHON3_SO_SUFFIX) \
+))
diff --git a/lang/python3/files/python3-package-pydoc.mk b/lang/python3/files/python3-package-pydoc.mk
new file mode 100644
index 000000000..7ed8c2110
--- /dev/null
+++ b/lang/python3/files/python3-package-pydoc.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-pydoc
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) pydoc module
+ DEPENDS:=+python3-light
+endef
+
+$(eval $(call Py3BasePackage,python3-pydoc, \
+ /usr/lib/python$(PYTHON3_VERSION)/doctest.py \
+ /usr/lib/python$(PYTHON3_VERSION)/pydoc.py \
+ /usr/lib/python$(PYTHON3_VERSION)/pydoc_data \
+))
diff --git a/lang/python3/files/python3-package-sqlite3.mk b/lang/python3/files/python3-package-sqlite3.mk
new file mode 100644
index 000000000..4b097a36b
--- /dev/null
+++ b/lang/python3/files/python3-package-sqlite3.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-sqlite3
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) sqlite3 module
+ DEPENDS:=+python3-light +libsqlite3
+endef
+
+$(eval $(call Py3BasePackage,python3-sqlite3, \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_sqlite3.$(PYTHON3_SO_SUFFIX) \
+ /usr/lib/python$(PYTHON3_VERSION)/sqlite3 \
+))
diff --git a/lang/python3/files/python3-package-unittest.mk b/lang/python3/files/python3-package-unittest.mk
new file mode 100644
index 000000000..6d3643a71
--- /dev/null
+++ b/lang/python3/files/python3-package-unittest.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-unittest
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) unittest module
+ DEPENDS:=+python3-light
+endef
+
+$(eval $(call Py3BasePackage,python3-unittest, \
+ /usr/lib/python$(PYTHON3_VERSION)/unittest \
+))
diff --git a/lang/python3/files/python3-package-xml.mk b/lang/python3/files/python3-package-xml.mk
new file mode 100644
index 000000000..e734f0c72
--- /dev/null
+++ b/lang/python3/files/python3-package-xml.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-xml
+$(call Package/python3/Default)
+ TITLE:=Python $(PYTHON3_VERSION) xml libs
+ DEPENDS:=+python3-light
+endef
+
+$(eval $(call Py3BasePackage,python3-xml, \
+ /usr/lib/python$(PYTHON3_VERSION)/xml \
+ /usr/lib/python$(PYTHON3_VERSION)/xmlrpc \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/_elementtree.$(PYTHON3_SO_SUFFIX) \
+ /usr/lib/python$(PYTHON3_VERSION)/lib-dynload/pyexpat.$(PYTHON3_SO_SUFFIX) \
+))
diff --git a/lang/python3/files/python3-package.mk b/lang/python3/files/python3-package.mk
index b28ec5833..e76dc0bc8 100644
--- a/lang/python3/files/python3-package.mk
+++ b/lang/python3/files/python3-package.mk
@@ -6,7 +6,7 @@
#
PYTHON3_VERSION:=3.4
-PYTHON3_VERSION_MICRO:=2
+PYTHON3_VERSION_MICRO:=3
PYTHON3_DIR:=$(STAGING_DIR)/usr
PYTHON3_BIN_DIR:=$(PYTHON3_DIR)/bin
diff --git a/lang/python3/patches/110-enable-zlib.patch b/lang/python3/patches/001-enable-zlib.patch
index 780831e86..780831e86 100644
--- a/lang/python3/patches/110-enable-zlib.patch
+++ b/lang/python3/patches/001-enable-zlib.patch
diff --git a/lang/python3/patches/120-do-not-add-include-dirs-when-cross-compiling.patch b/lang/python3/patches/002-do-not-add-include-dirs-when-cross-compiling.patch
index 44be1c8ff..44be1c8ff 100644
--- a/lang/python3/patches/120-do-not-add-include-dirs-when-cross-compiling.patch
+++ b/lang/python3/patches/002-do-not-add-include-dirs-when-cross-compiling.patch
diff --git a/lang/python3/patches/130-do-not-run-distutils-tests.patch b/lang/python3/patches/003-do-not-run-distutils-tests.patch
index 0291eb198..0291eb198 100644
--- a/lang/python3/patches/130-do-not-run-distutils-tests.patch
+++ b/lang/python3/patches/003-do-not-run-distutils-tests.patch
diff --git a/lang/python3/patches/140-do-not-write-bytes-codes.patch b/lang/python3/patches/004-do-not-write-bytes-codes.patch
index f624d5862..f624d5862 100644
--- a/lang/python3/patches/140-do-not-write-bytes-codes.patch
+++ b/lang/python3/patches/004-do-not-write-bytes-codes.patch
diff --git a/lang/python3/patches/005-fix-libffi-x86-64-configure.patch b/lang/python3/patches/005-fix-libffi-x86-64-configure.patch
new file mode 100644
index 000000000..ea062a350
--- /dev/null
+++ b/lang/python3/patches/005-fix-libffi-x86-64-configure.patch
@@ -0,0 +1,31 @@
+diff --git a/Modules/_ctypes/libffi/configure b/Modules/_ctypes/libffi/configure
+index 75f62a7..4d6c9f2 100755
+--- a/Modules/_ctypes/libffi/configure
++++ b/Modules/_ctypes/libffi/configure
+@@ -17257,20 +17257,12 @@ case "$host" in
+ fi
+ ;;
+
+- i?86-*-* | x86_64-*-*)
+- TARGETDIR=x86
+- if test $ac_cv_sizeof_size_t = 4; then
+- case "$host" in
+- *-gnux32)
+- TARGET=X86_64
+- ;;
+- *)
+- TARGET=X86
+- ;;
+- esac
+- else
+- TARGET=X86_64;
+- fi
++ i?86-*-*)
++ TARGET=X86; TARGETDIR=x86
++ ;;
++
++ x86_64-*-*)
++ TARGET=X86_64; TARGETDIR=x86
+ ;;
+
+ ia64*-*-*)
diff --git a/lang/python3/patches/006-remove-debian-multiarch-support.patch b/lang/python3/patches/006-remove-debian-multiarch-support.patch
new file mode 100644
index 000000000..52d52b94e
--- /dev/null
+++ b/lang/python3/patches/006-remove-debian-multiarch-support.patch
@@ -0,0 +1,12 @@
+diff --git a/setup.py b/setup.py
+index 7868b7b..9ae0ef2 100644
+--- a/setup.py
++++ b/setup.py
+@@ -444,7 +444,6 @@ class PyBuildExt(build_ext):
+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ if cross_compiling:
+ self.add_gcc_paths()
+- self.add_multiarch_paths()
+
+ # Add paths specified in the environment variables LDFLAGS and
+ # CPPFLAGS for header and library files.
diff --git a/lang/python3/patches/007-distutils-do-not-adjust-path.patch b/lang/python3/patches/007-distutils-do-not-adjust-path.patch
new file mode 100644
index 000000000..49fe92629
--- /dev/null
+++ b/lang/python3/patches/007-distutils-do-not-adjust-path.patch
@@ -0,0 +1,10 @@
+--- a/Lib/distutils/command/build_scripts.py
++++ b/Lib/distutils/command/build_scripts.py
+@@ -89,6 +89,7 @@ class build_scripts (Command):
+ adjust = 1
+ post_interp = match.group(1) or ''
+
++ adjust = 0
+ if adjust:
+ log.info("copying and adjusting %s -> %s", script,
+ self.build_dir)
diff --git a/lang/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch b/lang/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch
new file mode 100644
index 000000000..5a106d4e8
--- /dev/null
+++ b/lang/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch
@@ -0,0 +1,15 @@
+diff --git a/setup.py b/setup.py
+index 7868b7b..544fa7e 100644
+--- a/setup.py
++++ b/setup.py
+@@ -452,8 +452,9 @@ class PyBuildExt(build_ext):
+ # directly since an inconsistently reproducible issue comes up where
+ # the environment variable is not set even though the value were passed
+ # into configure and stored in the Makefile (issue found on OS X 10.3).
++ rt_lib_dirs = [] if cross_compiling else self.compiler.runtime_library_dirs
+ for env_var, arg_name, dir_list in (
+- ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
++ ('LDFLAGS', '-R', rt_lib_dirs),
+ ('LDFLAGS', '-L', self.compiler.library_dirs),
+ ('CPPFLAGS', '-I', self.compiler.include_dirs)):
+ env_val = sysconfig.get_config_var(env_var)
diff --git a/lang/python3/patches/011-do-not-prefer-ncursesw.patch b/lang/python3/patches/011-do-not-prefer-ncursesw.patch
new file mode 100644
index 000000000..c02322534
--- /dev/null
+++ b/lang/python3/patches/011-do-not-prefer-ncursesw.patch
@@ -0,0 +1,15 @@
+diff --git a/setup.py b/setup.py
+index 2779658..b6d3d61 100644
+--- a/setup.py
++++ b/setup.py
+@@ -693,8 +693,8 @@ class PyBuildExt(build_ext):
+ # use the same library for the readline and curses modules.
+ if 'curses' in readline_termcap_library:
+ curses_library = readline_termcap_library
+- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
+- curses_library = 'ncursesw'
++ #elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
++ # curses_library = 'ncursesw'
+ elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
+ curses_library = 'ncurses'
+ elif self.compiler.find_library_file(lib_dirs, 'curses'):