PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python3-package.mk)
+include ../python3-package.mk
define Package/python3-flask
SECTION:=lang
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python3-package.mk)
+include ../python3-package.mk
define Package/python3-jinja2
SECTION:=lang
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python3-package.mk)
+include ../python3-package.mk
define Package/python3-markupsafe
SECTION:=lang
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python3-package.mk)
+include ../python3-package.mk
define Package/python3-werkzeug
SECTION:=lang
PKG_HASH:=84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/chardet
SUBMENU:=Python
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python3-package.mk)
+include ../python3-package.mk
define Package/python3-click
SECTION:=lang
PKG_HASH:=6a4d9aea683b4c224d97ab8ee11ad2d29a37072c0c6c509896dd9857466fb261
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/django-appconf
SUBMENU:=Python
PKG_HASH:=9616570e5b08e92fa9eadc7a1b1b49639cce07ef392fc27c74230ab08075b30f
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/django-compressor
SUBMENU:=Python
PKG_HASH:=6eec9f3ac4e5657b93e64f3379181d1e727088df10dd34f0398cd12119b9f0b0
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/django-constance
SUBMENU:=Python
PKG_HASH:=6c0afd5554739365b55d86e285cf966cc3a45682fff963463364ea1f6511ca3e
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/django-jsonfield
SUBMENU:=Python
PKG_HASH:=61e3ba7f6df82d8df9e6be3a8c55ef589eb3bf926c3d25d2b7949b07eae78354
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/django-picklefield
SUBMENU:=Python
PKG_HASH:=8d691b2e53ba8121d770ce448f05568874cf78a3cf63215918ad49536db5e76a
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/django-postoffice
SUBMENU:=Python
PKG_HASH:=305b2c6564ca46d3b558ba21110ed717135c467adf1a6dfd192bd85f4bb04d50
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/django-restframework
SUBMENU:=Python
PKG_HASH:=3cb5334d42cfabda49c9c0efb1c24f5663e318ed34b3a34fada5195232f75f65
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/django-statici18n
SUBMENU:=Python
PKG_MIRROR_HASH:=c82c2cc338ae46ba8572d9960fc98dca932edc43a00f011fed102810a86185ae
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/django
SUBMENU:=Python
PKG_HASH:=614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/et_xmlfile
SUBMENU:=Python
PKG_HASH:=4bad317a5fc1ce3d4fe5e9b6d846ec38a8023e16876785d4f88102f2c8097dd9
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/flup
SUBMENU:=Python
PKG_HASH:=eee1169f0ca667be05db3351a0960765620dad53f53434262ff8901b68a1b622
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/gunicorn
SUBMENU:=Python
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python3-package.mk)
+include ../python3-package.mk
define Package/python3-itsdangerous
SECTION:=lang
PKG_HASH:=b760160f8dc8cc51d17875c6b663fafe64be699e10ce34b6a95184b5aa0fdc9e
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/jdcal
SUBMENU:=Python
PKG_HASH:=3b42ece7933b46b2128f8d4111c57c80fb5aa46f4d16e7f83281f169e7398ba7
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/openpyxl
SUBMENU:=Python
PKG_MIRROR_HASH:=e7c36bcf89614337d9abc4d07780da0b346a745be7a9aa55b398fa427549273c
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/pillow
SUBMENU:=Python
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
define Package/python-pyodbc/Default
SECTION:=lang
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-asn1crypto-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)"
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
PKG_BUILD_DEPENDS:=python
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-crcmod
SUBMENU:=Python
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-crypto
SECTION:=lang-python
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptography-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
PKG_HASH:=43231bf2bafde923a6d9bb79e2407342a5f3382c1ef0a3b2e491c6a4e50b91aa
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-curl
CATEGORY:=Languages
PKG_HASH:=891c38b2a02f5bb1be3e4793866c8df49c7d19baabf9c1bad62547e0b4866aca
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-dateutil
SUBMENU:=Python
PKG_BUILD_DIR:=$(BUILD_DIR)/dnspython-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-dns
SECTION:=language-python
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-dpkt
SECTION:=language-python
PKG_BUILD_DEPENDS:=python
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-egenix-mx-base
SUBMENU:=Python
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-enum34
SECTION:=lang
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-evdev-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
PKG_UNPACK:=unzip -q -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE); mv -f $(PKG_BUILD_DIR)/gmpy2-$(PKG_VERSION)/* $(PKG_BUILD_DIR)
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
define Package/python-gnupg/Default
SECTION:=lang
--- /dev/null
+#
+# Copyright (C) 2015-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+# Note: include this after `include $(TOPDIR)/rules.mk in your package Makefile
+# if `python-package.mk` is included, this will already be included
+
+ifneq ($(__python_host_mk_inc),1)
+__python_host_mk_inc=1
+
+# For PYTHON_VERSION
+python_mk_path:=$(dir $(lastword $(MAKEFILE_LIST)))
+include $(python_mk_path)python-version.mk
+
+HOST_PYTHON_DIR:=$(STAGING_DIR_HOSTPKG)
+HOST_PYTHON_INC_DIR:=$(HOST_PYTHON_DIR)/include/python$(PYTHON_VERSION)
+HOST_PYTHON_LIB_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION)
+
+HOST_PYTHON_PKG_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION)/site-packages
+
+HOST_PYTHON_BIN:=$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION)
+
+HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(HOST_PYTHON_PKG_DIR)
+
+define HostPython
+ if [ "$(strip $(3))" == "HOST" ]; then \
+ export PYTHONPATH="$(HOST_PYTHONPATH)"; \
+ export PYTHONDONTWRITEBYTECODE=0; \
+ else \
+ export PYTHONPATH="$(PYTHONPATH)"; \
+ export PYTHONDONTWRITEBYTECODE=1; \
+ export _python_sysroot="$(STAGING_DIR)"; \
+ export _python_prefix="/usr"; \
+ export _python_exec_prefix="/usr"; \
+ fi; \
+ export PYTHONOPTIMIZE=""; \
+ $(1) \
+ $(HOST_PYTHON_BIN) $(2);
+endef
+
+define host_python_settings
+ ARCH="$(HOST_ARCH)" \
+ CC="$(HOSTCC)" \
+ CCSHARED="$(HOSTCC) $(HOST_FPIC)" \
+ CXX="$(HOSTCXX)" \
+ LD="$(HOSTCC)" \
+ LDSHARED="$(HOSTCC) -shared" \
+ CFLAGS="$(HOST_CFLAGS)" \
+ CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON_INC_DIR)" \
+ LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib" \
+ _PYTHON_HOST_PLATFORM=linux2
+endef
+
+# $(1) => commands to execute before running pythons script
+# $(2) => python script and its arguments
+# $(3) => additional variables
+define Build/Compile/HostPyRunHost
+ $(call HostPython, \
+ $(if $(1),$(1);) \
+ $(call host_python_settings) \
+ $(3) \
+ , \
+ $(2) \
+ , \
+ HOST \
+ )
+endef
+
+# Note: I shamelessly copied this from Yousong's logic (from python-packages);
+HOST_PYTHON_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON_VERSION)
+define host_python_pip_install
+ $(call host_python_settings) \
+ $(HOST_PYTHON_PIP) install \
+ --root=$(1) \
+ --prefix=$(2) \
+ --ignore-installed \
+ $(3)
+endef
+
+define host_python_pip_install_host
+$(call host_python_pip_install,$(STAGING_DIR_HOSTPKG),"",$(1))
+endef
+
+# $(1) => build subdir
+# $(2) => additional arguments to setup.py
+# $(3) => additional variables
+define Build/Compile/HostPyMod
+ $(call Build/Compile/HostPyRunHost, \
+ cd $(HOST_BUILD_DIR)/$(strip $(1)), \
+ ./setup.py $(2), \
+ $(3))
+endef
+
+endif # __python_host_mk_inc
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-idna-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-ipaddress
SECTION:=lang
PKG_HASH:=5810f1b5a9ae9255df99fb9c2dcab7352fed325687efda56c0faae1a82c5e3cb
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-ldap
SUBMENU:=Python
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
define Package/python-lxml/Default
SECTION:=lang
PKG_HASH:=811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e140c74
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-mysql
SUBMENU:=Python
--- /dev/null
+#!/bin/sh
+set -e
+
+process_filespec() {
+ local src_dir="$1"
+ local dst_dir="$2"
+ local filespec="$3"
+ echo "$filespec" | (
+ IFS='|'
+ while read fop fspec fperm; do
+ local fop=`echo "$fop" | tr -d ' \t\n'`
+ if [ "$fop" = "+" ]; then
+ if [ ! -e "${src_dir}${fspec}" ]; then
+ echo "File not found '${src_dir}${fspec}'"
+ exit 1
+ fi
+ dpath=`dirname "$fspec"`
+ if [ -z "$fperm" ]; then
+ dperm=`stat -c "%a" ${src_dir}${dpath}`
+ fi
+ mkdir -p -m$dperm ${dst_dir}${dpath}
+ echo "copying: '$fspec'"
+ cp -fpR ${src_dir}${fspec} ${dst_dir}${dpath}/
+ if [ -n "$fperm" ]; then
+ chmod -R $fperm ${dst_dir}${fspec}
+ fi
+ elif [ "$fop" = "-" ]; then
+ echo "removing: '$fspec'"
+ rm -fR ${dst_dir}${fspec}
+ elif [ "$fop" = "=" ]; then
+ echo "setting permissions: '$fperm' on '$fspec'"
+ chmod -R $fperm ${dst_dir}${fspec}
+ fi
+ done
+ )
+}
+
+ver="$1"
+src_dir="$2"
+dst_dir="$3"
+python="$4"
+mode="$5"
+filespec="$6"
+
+process_filespec "$src_dir" "$dst_dir" "$filespec" || {
+ echo "process filespec error-ed"
+ exit 1
+}
+
+if [ "$mode" == "sources" ] ; then
+ # Copy only python source files
+ find $dst_dir -not -type d -not -name "*\.py" | xargs rm -f
+
+ # Delete empty folders (if the case)
+ if [ -d "$dst_dir/usr" ] ; then
+ find $dst_dir/usr -type d | xargs rmdir --ignore-fail-on-non-empty
+ rmdir --ignore-fail-on-non-empty $dst_dir/usr
+ fi
+ exit 0
+fi
+
+legacy=
+[ "$ver" == "3" ] && legacy="-b"
+
+# XXX [So that you won't goof as I did]
+# Note: Yes, I tried to use the -O & -OO flags here.
+# However the generated byte-codes were not portable.
+# So, we just stuck to un-optimized byte-codes,
+# which is still way better/faster than running
+# Python sources all the time.
+$python -m compileall $legacy -d '/' $dst_dir || {
+ echo "python -m compileall err-ed"
+ exit 1
+}
+
+# Delete source files and pyc [ un-optimized bytecode files ]
+# We may want to make this optimization thing configurable later, but not sure atm
+find $dst_dir -type f -name "*\.py" | xargs rm -f
+
+# Delete empty folders (if the case)
+if [ -d "$dst_dir/usr" ] ; then
+ find $dst_dir/usr -type d | xargs rmdir --ignore-fail-on-non-empty
+ rmdir --ignore-fail-on-non-empty $dst_dir/usr
+fi
+
+exit 0
--- /dev/null
+#
+# Copyright (C) 2006-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+# Note: include this after `include $(TOPDIR)/rules.mk in your package Makefile
+
+python_mk_path:=$(dir $(lastword $(MAKEFILE_LIST)))
+include $(python_mk_path)python-host.mk
+
+PYTHON_DIR:=$(STAGING_DIR)/usr
+PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin
+PYTHON_INC_DIR:=$(PYTHON_DIR)/include/python$(PYTHON_VERSION)
+PYTHON_LIB_DIR:=$(PYTHON_DIR)/lib/python$(PYTHON_VERSION)
+
+PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages
+
+PYTHON:=python$(PYTHON_VERSION)
+
+PYTHONPATH:=$(PYTHON_LIB_DIR):$(STAGING_DIR)/$(PYTHON_PKG_DIR):$(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)
+
+# These configure args are needed in detection of path to Python header files
+# using autotools.
+CONFIGURE_ARGS += \
+ _python_sysroot="$(STAGING_DIR)" \
+ _python_prefix="/usr" \
+ _python_exec_prefix="/usr"
+
+PKG_USE_MIPS16:=0
+# This is required in addition to PKG_USE_MIPS16:=0 because otherwise MIPS16
+# flags are inherited from the Python base package (via sysconfig module)
+ifdef CONFIG_USE_MIPS16
+ TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16
+endif
+
+define PyPackage
+
+ define Package/$(1)-src
+ $(call Package/$(1))
+ TITLE+= (sources)
+ DEPENDS:=$$$$(foreach dep,$$$$(filter +python-%,$$$$(DEPENDS)),$$$$(dep)-src)
+ endef
+
+ define Package/$(1)-src/description
+ $(call Package/$(1)/description).
+ (Contains the Python sources for this package).
+ endef
+
+ # Add default PyPackage filespec none defined
+ ifndef PyPackage/$(1)/filespec
+ define PyPackage/$(1)/filespec
+ +|$(PYTHON_PKG_DIR)
+ endef
+ endif
+
+ ifndef PyPackage/$(1)/install
+ define PyPackage/$(1)/install
+ if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then \
+ $(INSTALL_DIR) $$(1)/usr/bin ; \
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $$(1)/usr/bin/ ; \
+ fi
+ endef
+ endif
+
+ ifndef Package/$(1)/install
+ $(call shexport,PyPackage/$(1)/filespec)
+
+ define Package/$(1)/install
+ $(call PyPackage/$(1)/install,$$(1))
+ find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
+ $(SHELL) $(python_mk_path)python-package-install.sh "2" \
+ "$(PKG_INSTALL_DIR)" "$$(1)" \
+ "$(HOST_PYTHON_BIN)" "$$(2)" \
+ "$$$$$$$$$$(call shvar,PyPackage/$(1)/filespec)"
+ endef
+
+ define Package/$(1)-src/install
+ $$(call Package/$(1)/install,$$(1),sources)
+ endef
+ endif # Package/$(1)/install
+endef
+
+# $(1) => commands to execute before running pythons script
+# $(2) => python script and its arguments
+# $(3) => additional variables
+define Build/Compile/HostPyRunTarget
+ $(call HostPython, \
+ $(if $(1),$(1);) \
+ CC="$(TARGET_CC)" \
+ CCSHARED="$(TARGET_CC) $(FPIC)" \
+ CXX="$(TARGET_CXX)" \
+ LD="$(TARGET_CC)" \
+ LDSHARED="$(TARGET_CC) -shared" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON_INC_DIR)" \
+ LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON_VERSION)" \
+ _PYTHON_HOST_PLATFORM=linux2 \
+ __PYVENV_LAUNCHER__="/usr/bin/$(PYTHON)" \
+ $(3) \
+ , \
+ $(2) \
+ )
+endef
+
+# $(1) => build subdir
+# $(2) => additional arguments to setup.py
+# $(3) => additional variables
+define Build/Compile/PyMod
+ $(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)
+ $(call Build/Compile/HostPyRunTarget, \
+ cd $(PKG_BUILD_DIR)/$(strip $(1)), \
+ ./setup.py $(2), \
+ $(3))
+ find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
+endef
+
+define PyBuild/Compile/Default
+ $(foreach pkg,$(HOST_PYTHON_PACKAGE_BUILD_DEPENDS),
+ $(call host_python_pip_install_host,$(pkg))
+ )
+ $(call Build/Compile/PyMod,, \
+ install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
+ --single-version-externally-managed \
+ )
+endef
+
+PyBuild/Compile=$(PyBuild/Compile/Default)
+
+ifeq ($(BUILD_VARIANT),python)
+define Build/Compile
+ $(call PyBuild/Compile)
+endef
+endif # python
PKG_BUILD_DEPENDS:=python python/host
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-packages
SUBMENU:=Python
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-pcapy
SECTION:=language-python
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
PKG_BUILD_DEPENDS:=python/host
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-psycopg2
SUBMENU:=Python
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pyasn1-modules-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pyasn1-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="ply==3.10"
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pyopenssl-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-pyptlib
SECTION:=lang
PKG_BUILD_DEPENDS:=python
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-pyserial
SUBMENU:=Python
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-service-identity
SECTION:=lang
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
HOST_UNPACK:=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-txsocksx
SECTION:=lang
PKG_HASH:=cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/python-urllib3
SUBMENU:=Python
--- /dev/null
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+PYTHON_VERSION:=2.7
+PYTHON_VERSION_MICRO:=14
+
+PYTHON_SETUPTOOLS_VERSION:=28.8.0
+PYTHON_PIP_VERSION:=9.0.1
+
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../python-package.mk
+include ../python3-package.mk
define Package/python-yaml/Default
SUBMENU:=Python
include $(TOPDIR)/rules.mk
# For PYTHON_VERSION
-include ./files/python-version.mk
+include ../python-version.mk
PKG_NAME:=python
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
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
# This file provides the necsessary host build variables
-include ./files/python-host.mk
+include ../python-host.mk
# For PyPackage
-include ./files/python-package.mk
+include ../python-package.mk
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
$(call Build/Compile/python-pip)
endef
-define Build/InstallMkFiles
- $(INSTALL_DIR) $(STAGING_DIR)/mk/
- $(INSTALL_DATA) \
- ./files/python-package.mk \
- ./files/python-host.mk \
- ./files/python-version.mk \
- ./files/python-package-install.sh \
- $(STAGING_DIR)/mk/
-endef
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ $(1)/usr/lib/pkgconfig
$(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
$(1)/usr/lib/python$(PYTHON_VERSION)/
- $(call Build/InstallMkFiles)
endef
PYTHON_BASE_LIB_FILES:= \
endef
define Host/Install
- $(call Build/InstallMkFiles)
$(MAKE) -C $(HOST_BUILD_DIR) install
$(INSTALL_DIR) $(HOST_PYTHON_DIR)/bin/
$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON_DIR)/bin/pgen2
+++ /dev/null
-#
-# Copyright (C) 2015-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-ifneq ($(__python_host_mk_inc),1)
-__python_host_mk_inc=1
-
-# For PYTHON_VERSION
-$(call include_mk, python-version.mk)
-
-HOST_PYTHON_DIR:=$(STAGING_DIR_HOSTPKG)
-HOST_PYTHON_INC_DIR:=$(HOST_PYTHON_DIR)/include/python$(PYTHON_VERSION)
-HOST_PYTHON_LIB_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION)
-
-HOST_PYTHON_PKG_DIR:=$(HOST_PYTHON_DIR)/lib/python$(PYTHON_VERSION)/site-packages
-
-HOST_PYTHON_BIN:=$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION)
-
-HOST_PYTHONPATH:=$(HOST_PYTHON_LIB_DIR):$(HOST_PYTHON_PKG_DIR)
-
-define HostPython
- if [ "$(strip $(3))" == "HOST" ]; then \
- export PYTHONPATH="$(HOST_PYTHONPATH)"; \
- export PYTHONDONTWRITEBYTECODE=0; \
- else \
- export PYTHONPATH="$(PYTHONPATH)"; \
- export PYTHONDONTWRITEBYTECODE=1; \
- export _python_sysroot="$(STAGING_DIR)"; \
- export _python_prefix="/usr"; \
- export _python_exec_prefix="/usr"; \
- fi; \
- export PYTHONOPTIMIZE=""; \
- $(1) \
- $(HOST_PYTHON_BIN) $(2);
-endef
-
-define host_python_settings
- ARCH="$(HOST_ARCH)" \
- CC="$(HOSTCC)" \
- CCSHARED="$(HOSTCC) $(HOST_FPIC)" \
- CXX="$(HOSTCXX)" \
- LD="$(HOSTCC)" \
- LDSHARED="$(HOSTCC) -shared" \
- CFLAGS="$(HOST_CFLAGS)" \
- CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON_INC_DIR)" \
- LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib" \
- _PYTHON_HOST_PLATFORM=linux2
-endef
-
-# $(1) => commands to execute before running pythons script
-# $(2) => python script and its arguments
-# $(3) => additional variables
-define Build/Compile/HostPyRunHost
- $(call HostPython, \
- $(if $(1),$(1);) \
- $(call host_python_settings) \
- $(3) \
- , \
- $(2) \
- , \
- HOST \
- )
-endef
-
-# Note: I shamelessly copied this from Yousong's logic (from python-packages);
-HOST_PYTHON_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON_VERSION)
-define host_python_pip_install
- $(call host_python_settings) \
- $(HOST_PYTHON_PIP) install \
- --root=$(1) \
- --prefix=$(2) \
- --ignore-installed \
- $(3)
-endef
-
-define host_python_pip_install_host
-$(call host_python_pip_install,$(STAGING_DIR_HOSTPKG),"",$(1))
-endef
-
-# $(1) => build subdir
-# $(2) => additional arguments to setup.py
-# $(3) => additional variables
-define Build/Compile/HostPyMod
- $(call Build/Compile/HostPyRunHost, \
- cd $(HOST_BUILD_DIR)/$(strip $(1)), \
- ./setup.py $(2), \
- $(3))
-endef
-
-endif # __python_host_mk_inc
+++ /dev/null
-#!/bin/sh
-set -e
-
-process_filespec() {
- local src_dir="$1"
- local dst_dir="$2"
- local filespec="$3"
- echo "$filespec" | (
- IFS='|'
- while read fop fspec fperm; do
- local fop=`echo "$fop" | tr -d ' \t\n'`
- if [ "$fop" = "+" ]; then
- if [ ! -e "${src_dir}${fspec}" ]; then
- echo "File not found '${src_dir}${fspec}'"
- exit 1
- fi
- dpath=`dirname "$fspec"`
- if [ -z "$fperm" ]; then
- dperm=`stat -c "%a" ${src_dir}${dpath}`
- fi
- mkdir -p -m$dperm ${dst_dir}${dpath}
- echo "copying: '$fspec'"
- cp -fpR ${src_dir}${fspec} ${dst_dir}${dpath}/
- if [ -n "$fperm" ]; then
- chmod -R $fperm ${dst_dir}${fspec}
- fi
- elif [ "$fop" = "-" ]; then
- echo "removing: '$fspec'"
- rm -fR ${dst_dir}${fspec}
- elif [ "$fop" = "=" ]; then
- echo "setting permissions: '$fperm' on '$fspec'"
- chmod -R $fperm ${dst_dir}${fspec}
- fi
- done
- )
-}
-
-src_dir="$1"
-dst_dir="$2"
-python="$3"
-mode="$4"
-filespec="$5"
-
-process_filespec "$src_dir" "$dst_dir" "$filespec" || {
- echo "process filespec error-ed"
- exit 1
-}
-
-if [ "$mode" == "sources" ] ; then
- # Copy only python source files
- find $dst_dir -not -type d -not -name "*\.py" | xargs rm -f
-
- # Delete empty folders (if the case)
- if [ -d "$dst_dir/usr" ] ; then
- find $dst_dir/usr -type d | xargs rmdir --ignore-fail-on-non-empty
- rmdir --ignore-fail-on-non-empty $dst_dir/usr
- fi
- exit 0
-fi
-
-# XXX [So that you won't goof as I did]
-# Note: Yes, I tried to use the -O & -OO flags here.
-# However the generated byte-codes were not portable.
-# So, we just stuck to un-optimized byte-codes,
-# which is still way better/faster than running
-# Python sources all the time.
-$python -m compileall -d '/' $dst_dir || {
- echo "python -m compileall err-ed"
- exit 1
-}
-
-# Delete source files and pyc [ un-optimized bytecode files ]
-# We may want to make this optimization thing configurable later, but not sure atm
-find $dst_dir -type f -name "*\.py" | xargs rm -f
-
-# Delete empty folders (if the case)
-if [ -d "$dst_dir/usr" ] ; then
- find $dst_dir/usr -type d | xargs rmdir --ignore-fail-on-non-empty
- rmdir --ignore-fail-on-non-empty $dst_dir/usr
-fi
-
-exit 0
+++ /dev/null
-#
-# Copyright (C) 2006-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-$(call include_mk, python-version.mk)
-
-PYTHON_DIR:=$(STAGING_DIR)/usr
-PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin
-PYTHON_INC_DIR:=$(PYTHON_DIR)/include/python$(PYTHON_VERSION)
-PYTHON_LIB_DIR:=$(PYTHON_DIR)/lib/python$(PYTHON_VERSION)
-
-PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages
-
-PYTHON:=python$(PYTHON_VERSION)
-
-PYTHONPATH:=$(PYTHON_LIB_DIR):$(STAGING_DIR)/$(PYTHON_PKG_DIR):$(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)
-
-# These configure args are needed in detection of path to Python header files
-# using autotools.
-CONFIGURE_ARGS += \
- _python_sysroot="$(STAGING_DIR)" \
- _python_prefix="/usr" \
- _python_exec_prefix="/usr"
-
-PKG_USE_MIPS16:=0
-# This is required in addition to PKG_USE_MIPS16:=0 because otherwise MIPS16
-# flags are inherited from the Python base package (via sysconfig module)
-ifdef CONFIG_USE_MIPS16
- TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16
-endif
-
-define PyPackage
-
- define Package/$(1)-src
- $(call Package/$(1))
- TITLE+= (sources)
- DEPENDS:=$$$$(foreach dep,$$$$(filter +python-%,$$$$(DEPENDS)),$$$$(dep)-src)
- endef
-
- define Package/$(1)-src/description
- $(call Package/$(1)/description).
- (Contains the Python sources for this package).
- endef
-
- # Add default PyPackage filespec none defined
- ifndef PyPackage/$(1)/filespec
- define PyPackage/$(1)/filespec
- +|$(PYTHON_PKG_DIR)
- endef
- endif
-
- ifndef PyPackage/$(1)/install
- define PyPackage/$(1)/install
- if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then \
- $(INSTALL_DIR) $$(1)/usr/bin ; \
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $$(1)/usr/bin/ ; \
- fi
- endef
- endif
-
- ifndef Package/$(1)/install
- $(call shexport,PyPackage/$(1)/filespec)
-
- define Package/$(1)/install
- $(call PyPackage/$(1)/install,$$(1))
- find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
- if [ -e files/python-package-install.sh ] ; then \
- $(SHELL) files/python-package-install.sh \
- "$(PKG_INSTALL_DIR)" "$$(1)" \
- "$(HOST_PYTHON_BIN)" "$$(2)" \
- "$$$$$$$$$$(call shvar,PyPackage/$(1)/filespec)" ; \
- elif [ -e $(STAGING_DIR)/mk/python-package-install.sh ] ; then \
- $(SHELL) $(STAGING_DIR)/mk/python-package-install.sh \
- "$(PKG_INSTALL_DIR)" "$$(1)" \
- "$(HOST_PYTHON_BIN)" "$$(2)" \
- "$$$$$$$$$$(call shvar,PyPackage/$(1)/filespec)" ; \
- else \
- echo "No 'python-package-install.sh' script found" ; \
- exit 1 ; \
- fi
- endef
-
- define Package/$(1)-src/install
- $$(call Package/$(1)/install,$$(1),sources)
- endef
- endif # Package/$(1)/install
-endef
-
-$(call include_mk, python-host.mk)
-
-# $(1) => commands to execute before running pythons script
-# $(2) => python script and its arguments
-# $(3) => additional variables
-define Build/Compile/HostPyRunTarget
- $(call HostPython, \
- $(if $(1),$(1);) \
- CC="$(TARGET_CC)" \
- CCSHARED="$(TARGET_CC) $(FPIC)" \
- CXX="$(TARGET_CXX)" \
- LD="$(TARGET_CC)" \
- LDSHARED="$(TARGET_CC) -shared" \
- CFLAGS="$(TARGET_CFLAGS)" \
- CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON_INC_DIR)" \
- LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON_VERSION)" \
- _PYTHON_HOST_PLATFORM=linux2 \
- __PYVENV_LAUNCHER__="/usr/bin/$(PYTHON)" \
- $(3) \
- , \
- $(2) \
- )
-endef
-
-# $(1) => build subdir
-# $(2) => additional arguments to setup.py
-# $(3) => additional variables
-define Build/Compile/PyMod
- $(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)
- $(call Build/Compile/HostPyRunTarget, \
- cd $(PKG_BUILD_DIR)/$(strip $(1)), \
- ./setup.py $(2), \
- $(3))
- find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
-endef
-
-define PyBuild/Compile/Default
- $(foreach pkg,$(HOST_PYTHON_PACKAGE_BUILD_DEPENDS),
- $(call host_python_pip_install_host,$(pkg))
- )
- $(call Build/Compile/PyMod,, \
- install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
- --single-version-externally-managed \
- )
-endef
-
-PyBuild/Compile=$(PyBuild/Compile/Default)
-
-ifeq ($(BUILD_VARIANT),python)
-define Build/Compile
- $(call PyBuild/Compile)
-endef
-endif # python
+++ /dev/null
-#
-# Copyright (C) 2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-PYTHON_VERSION:=2.7
-PYTHON_VERSION_MICRO:=14
-
-PYTHON_SETUPTOOLS_VERSION:=28.8.0
-PYTHON_PIP_VERSION:=9.0.1
-
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python3-package.mk)
+include ../python3-package.mk
define Package/python3-bottle
SECTION:=lang
--- /dev/null
+#
+# Copyright (C) 2017 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+# Note: include this after `include $(TOPDIR)/rules.mk in your package Makefile
+# if `python3-package.mk` is included, this will already be included
+
+ifneq ($(__python3_host_mk_inc),1)
+__python3_host_mk_inc=1
+
+# For PYTHON3_VERSION
+python3_mk_path:=$(dir $(lastword $(MAKEFILE_LIST)))
+include $(python3_mk_path)python3-version.mk
+
+HOST_PYTHON3_DIR:=$(STAGING_DIR_HOSTPKG)
+HOST_PYTHON3_INC_DIR:=$(HOST_PYTHON3_DIR)/include/python$(PYTHON3_VERSION)
+HOST_PYTHON3_LIB_DIR:=$(HOST_PYTHON3_DIR)/lib/python$(PYTHON3_VERSION)
+
+HOST_PYTHON3_PKG_DIR:=$(HOST_PYTHON3_DIR)/lib/python$(PYTHON3_VERSION)/site-packages
+
+HOST_PYTHON3_BIN:=$(HOST_PYTHON3_DIR)/bin/python$(PYTHON3_VERSION)
+
+HOST_PYTHON3PATH:=$(HOST_PYTHON3_LIB_DIR):$(HOST_PYTHON3_PKG_DIR)
+
+define HostPython3
+ if [ "$(strip $(3))" == "HOST" ]; then \
+ export PYTHONPATH="$(HOST_PYTHON3PATH)"; \
+ export PYTHONDONTWRITEBYTECODE=0; \
+ else \
+ export PYTHONPATH="$(PYTHON3PATH)"; \
+ export PYTHONDONTWRITEBYTECODE=1; \
+ export _python_sysroot="$(STAGING_DIR)"; \
+ export _python_prefix="/usr"; \
+ export _python_exec_prefix="/usr"; \
+ fi; \
+ export PYTHONOPTIMIZE=""; \
+ $(1) \
+ $(HOST_PYTHON3_BIN) $(2);
+endef
+
+define host_python3_settings
+ ARCH="$(HOST_ARCH)" \
+ CC="$(HOSTCC)" \
+ CCSHARED="$(HOSTCC) $(HOST_FPIC)" \
+ CXX="$(HOSTCXX)" \
+ LD="$(HOSTCC)" \
+ LDSHARED="$(HOSTCC) -shared" \
+ CFLAGS="$(HOST_CFLAGS)" \
+ CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON3_INC_DIR)" \
+ LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON3_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib" \
+ _PYTHON_HOST_PLATFORM=linux2
+endef
+
+# $(1) => commands to execute before running pythons script
+# $(2) => python script and its arguments
+# $(3) => additional variables
+define Build/Compile/HostPy3RunHost
+ $(call HostPython3, \
+ $(if $(1),$(1);) \
+ $(call host_python3_settings) \
+ $(3) \
+ , \
+ $(2) \
+ , \
+ HOST \
+ )
+endef
+
+# Note: I shamelessly copied this from Yousong's logic (from python-packages);
+HOST_PYTHON3_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON3_VERSION)
+define host_python3_pip_install
+ $(call host_python3_settings) \
+ $(HOST_PYTHON3_PIP) install \
+ --root=$(1) \
+ --prefix=$(2) \
+ --ignore-installed \
+ $(3)
+endef
+
+define host_python3_pip_install_host
+$(call host_python3_pip_install,$(STAGING_DIR_HOSTPKG),"",$(1))
+endef
+
+# $(1) => build subdir
+# $(2) => additional arguments to setup.py
+# $(3) => additional variables
+define Build/Compile/HostPy3Mod
+ $(call Build/Compile/HostPy3RunHost, \
+ cd $(HOST_BUILD_DIR)/$(strip $(1)), \
+ ./setup.py $(2), \
+ $(3))
+endef
+
+endif # __python3_host_mk_inc
--- /dev/null
+#
+# Copyright (C) 2007-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+# Note: include this after `include $(TOPDIR)/rules.mk in your package Makefile
+python3_mk_path:=$(dir $(lastword $(MAKEFILE_LIST)))
+include $(python3_mk_path)python3-host.mk
+
+PYTHON3_DIR:=$(STAGING_DIR)/usr
+PYTHON3_BIN_DIR:=$(PYTHON3_DIR)/bin
+PYTHON3_INC_DIR:=$(PYTHON3_DIR)/include/python$(PYTHON3_VERSION)
+PYTHON3_LIB_DIR:=$(PYTHON3_DIR)/lib/python$(PYTHON3_VERSION)
+
+PYTHON3_PKG_DIR:=/usr/lib/python$(PYTHON3_VERSION)/site-packages
+
+PYTHON3:=python$(PYTHON3_VERSION)
+
+PYTHON3PATH:=$(PYTHON3_LIB_DIR):$(STAGING_DIR)/$(PYTHON3_PKG_DIR):$(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)
+
+# These configure args are needed in detection of path to Python header files
+# using autotools.
+CONFIGURE_ARGS += \
+ _python_sysroot="$(STAGING_DIR)" \
+ _python_prefix="/usr" \
+ _python_exec_prefix="/usr"
+
+PKG_USE_MIPS16:=0
+# This is required in addition to PKG_USE_MIPS16:=0 because otherwise MIPS16
+# flags are inherited from the Python base package (via sysconfig module)
+ifdef CONFIG_USE_MIPS16
+ TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16
+endif
+
+define Py3Package
+
+ define Package/$(1)-src
+ $(call Package/$(1))
+ TITLE+= (sources)
+ DEPENDS:=$$$$(foreach dep,$$$$(filter +python3-%,$$$$(DEPENDS)),$$$$(dep)-src)
+ endef
+
+ define Package/$(1)-src/description
+ $(call Package/$(1)/description).
+ (Contains the Python3 sources for this package).
+ endef
+
+ # Add default PyPackage filespec none defined
+ ifndef Py3Package/$(1)/filespec
+ define Py3Package/$(1)/filespec
+ +|$(PYTHON3_PKG_DIR)
+ endef
+ endif
+
+ ifndef Py3Package/$(1)/install
+ define Py3Package/$(1)/install
+ if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then \
+ $(INSTALL_DIR) $$(1)/usr/bin ; \
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $$(1)/usr/bin/ ; \
+ fi
+ endef
+ endif
+
+ ifndef Package/$(1)/install
+ $(call shexport,Py3Package/$(1)/filespec)
+
+ define Package/$(1)/install
+ $(call Py3Package/$(1)/install,$$(1))
+ find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
+ $(SHELL) $(python3_mk_path)python-package-install.sh "3" \
+ "$(PKG_INSTALL_DIR)" "$$(1)" \
+ "$(HOST_PYTHON3_BIN)" "$$(2)" \
+ "$$$$$$$$$$(call shvar,Py3Package/$(1)/filespec)"
+ endef
+
+ define Package/$(1)-src/install
+ $$(call Package/$(1)/install,$$(1),sources)
+ endef
+ endif # Package/$(1)/install
+endef
+
+# $(1) => commands to execute before running pythons script
+# $(2) => python script and its arguments
+# $(3) => additional variables
+define Build/Compile/HostPy3RunTarget
+ $(call HostPython3, \
+ $(if $(1),$(1);) \
+ CC="$(TARGET_CC)" \
+ CCSHARED="$(TARGET_CC) $(FPIC)" \
+ CXX="$(TARGET_CXX)" \
+ LD="$(TARGET_CC)" \
+ LDSHARED="$(TARGET_CC) -shared" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON3_INC_DIR)" \
+ LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON3_VERSION)" \
+ _PYTHON_HOST_PLATFORM=linux2 \
+ __PYVENV_LAUNCHER__="/usr/bin/$(PYTHON3)" \
+ $(3) \
+ , \
+ $(2) \
+ )
+endef
+
+# $(1) => build subdir
+# $(2) => additional arguments to setup.py
+# $(3) => additional variables
+define Build/Compile/Py3Mod
+ $(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)
+ $(call Build/Compile/HostPy3RunTarget, \
+ cd $(PKG_BUILD_DIR)/$(strip $(1)), \
+ ./setup.py $(2), \
+ $(3))
+ find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
+endef
+
+define Py3Build/Compile/Default
+ $(foreach pkg,$(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS),
+ $(call host_python3_pip_install_host,$(pkg))
+ )
+ $(call Build/Compile/Py3Mod,, \
+ install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
+ --single-version-externally-managed \
+ )
+endef
+
+Py3Build/Compile=$(Py3Build/Compile/Default)
+
+ifeq ($(BUILD_VARIANT),python3)
+define Build/Compile
+ $(call Py3Build/Compile)
+endef
+endif # python3
--- /dev/null
+#
+# Copyright (C) 2007-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+# Note: keep in sync with setuptools & pip
+PYTHON3_VERSION_MAJOR:=3
+PYTHON3_VERSION_MINOR:=6
+PYTHON3_VERSION_MICRO:=4
+
+PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
+
+PYTHON3_SETUPTOOLS_VERSION:=28.8.0
+PYTHON3_PIP_VERSION:=9.0.1
+
include $(TOPDIR)/rules.mk
# The file included below defines PYTHON_VERSION
-include ./files/python3-version.mk
+include ../python3-version.mk
PYTHON_VERSION:=$(PYTHON3_VERSION)
PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
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
# This file provides the necsessary host build variables
-include ./files/python3-host.mk
+include ../python3-host.mk
# For Py3Package
-include ./files/python3-package.mk
+include ../python3-package.mk
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
$(call Build/Compile/python3-pip)
endef
-define Build/InstallMkFiles
- $(INSTALL_DIR) $(STAGING_DIR)/mk/
- $(INSTALL_DATA) \
- ./files/python3-package.mk \
- ./files/python3-host.mk \
- ./files/python3-version.mk \
- ./files/python3-package-install.sh \
- $(STAGING_DIR)/mk/
-endef
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION) \
$(1)/usr/lib/python$(PYTHON_VERSION)/
- $(call Build/InstallMkFiles)
endef
PYTHON3_BASE_LIB_FILES:= \
endef
define Host/Install
- $(call Build/InstallMkFiles)
$(MAKE) -C $(HOST_BUILD_DIR) install
$(INSTALL_DIR) $(HOST_PYTHON3_DIR)/bin/
$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON3_DIR)/bin/pgen3
+++ /dev/null
-#
-# Copyright (C) 2017 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-ifneq ($(__python3_host_mk_inc),1)
-__python3_host_mk_inc=1
-
-# For PYTHON3_VERSION
-$(call include_mk, python3-version.mk)
-
-HOST_PYTHON3_DIR:=$(STAGING_DIR_HOSTPKG)
-HOST_PYTHON3_INC_DIR:=$(HOST_PYTHON3_DIR)/include/python$(PYTHON3_VERSION)
-HOST_PYTHON3_LIB_DIR:=$(HOST_PYTHON3_DIR)/lib/python$(PYTHON3_VERSION)
-
-HOST_PYTHON3_PKG_DIR:=$(HOST_PYTHON3_DIR)/lib/python$(PYTHON3_VERSION)/site-packages
-
-HOST_PYTHON3_BIN:=$(HOST_PYTHON3_DIR)/bin/python$(PYTHON3_VERSION)
-
-HOST_PYTHON3PATH:=$(HOST_PYTHON3_LIB_DIR):$(HOST_PYTHON3_PKG_DIR)
-
-define HostPython3
- if [ "$(strip $(3))" == "HOST" ]; then \
- export PYTHONPATH="$(HOST_PYTHON3PATH)"; \
- export PYTHONDONTWRITEBYTECODE=0; \
- else \
- export PYTHONPATH="$(PYTHON3PATH)"; \
- export PYTHONDONTWRITEBYTECODE=1; \
- export _python_sysroot="$(STAGING_DIR)"; \
- export _python_prefix="/usr"; \
- export _python_exec_prefix="/usr"; \
- fi; \
- export PYTHONOPTIMIZE=""; \
- $(1) \
- $(HOST_PYTHON3_BIN) $(2);
-endef
-
-define host_python3_settings
- ARCH="$(HOST_ARCH)" \
- CC="$(HOSTCC)" \
- CCSHARED="$(HOSTCC) $(HOST_FPIC)" \
- CXX="$(HOSTCXX)" \
- LD="$(HOSTCC)" \
- LDSHARED="$(HOSTCC) -shared" \
- CFLAGS="$(HOST_CFLAGS)" \
- CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON3_INC_DIR)" \
- LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON3_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR_HOSTPKG)/lib" \
- _PYTHON_HOST_PLATFORM=linux2
-endef
-
-# $(1) => commands to execute before running pythons script
-# $(2) => python script and its arguments
-# $(3) => additional variables
-define Build/Compile/HostPy3RunHost
- $(call HostPython3, \
- $(if $(1),$(1);) \
- $(call host_python3_settings) \
- $(3) \
- , \
- $(2) \
- , \
- HOST \
- )
-endef
-
-# Note: I shamelessly copied this from Yousong's logic (from python-packages);
-HOST_PYTHON3_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON3_VERSION)
-define host_python3_pip_install
- $(call host_python3_settings) \
- $(HOST_PYTHON3_PIP) install \
- --root=$(1) \
- --prefix=$(2) \
- --ignore-installed \
- $(3)
-endef
-
-define host_python3_pip_install_host
-$(call host_python3_pip_install,$(STAGING_DIR_HOSTPKG),"",$(1))
-endef
-
-# $(1) => build subdir
-# $(2) => additional arguments to setup.py
-# $(3) => additional variables
-define Build/Compile/HostPy3Mod
- $(call Build/Compile/HostPy3RunHost, \
- cd $(HOST_BUILD_DIR)/$(strip $(1)), \
- ./setup.py $(2), \
- $(3))
-endef
-
-endif # __python3_host_mk_inc
+++ /dev/null
-#!/bin/sh
-set -e
-
-process_filespec() {
- local src_dir="$1"
- local dst_dir="$2"
- local filespec="$3"
- echo "$filespec" | (
- IFS='|'
- while read fop fspec fperm; do
- local fop=`echo "$fop" | tr -d ' \t\n'`
- if [ "$fop" = "+" ]; then
- if [ ! -e "${src_dir}${fspec}" ]; then
- echo "File not found '${src_dir}${fspec}'"
- exit 1
- fi
- dpath=`dirname "$fspec"`
- if [ -z "$fperm" ]; then
- dperm=`stat -c "%a" ${src_dir}${dpath}`
- fi
- mkdir -p -m$dperm ${dst_dir}${dpath}
- echo "copying: '$fspec'"
- cp -fpR ${src_dir}${fspec} ${dst_dir}${dpath}/
- if [ -n "$fperm" ]; then
- chmod -R $fperm ${dst_dir}${fspec}
- fi
- elif [ "$fop" = "-" ]; then
- echo "removing: '$fspec'"
- rm -fR ${dst_dir}${fspec}
- elif [ "$fop" = "=" ]; then
- echo "setting permissions: '$fperm' on '$fspec'"
- chmod -R $fperm ${dst_dir}${fspec}
- fi
- done
- )
-}
-
-src_dir="$1"
-dst_dir="$2"
-python="$3"
-mode="$4"
-filespec="$5"
-
-process_filespec "$src_dir" "$dst_dir" "$filespec" || {
- echo "process filespec error-ed"
- exit 1
-}
-
-if [ "$mode" == "sources" ] ; then
- # Copy only python source files
- find $dst_dir -not -type d -not -name "*\.py" | xargs rm -f
-
- # Delete empty folders (if the case)
- if [ -d "$dst_dir/usr" ] ; then
- find $dst_dir/usr -type d | xargs rmdir --ignore-fail-on-non-empty
- rmdir --ignore-fail-on-non-empty $dst_dir/usr
- fi
- exit 0
-fi
-
-# XXX [So that you won't goof as I did]
-# Note: Yes, I tried to use the -O & -OO flags here.
-# However the generated byte-codes were not portable.
-# So, we just stuck to un-optimized byte-codes,
-# which is still way better/faster than running
-# Python sources all the time.
-$python -m compileall -b -d '/' $dst_dir || {
- echo "python -m compileall err-ed"
- exit 1
-}
-
-# Delete source files and pyc [ un-optimized bytecode files ]
-# We may want to make this optimization thing configurable later, but not sure atm
-find $dst_dir -type f -name "*\.py" | xargs rm -f
-
-# Delete empty folders (if the case)
-if [ -d "$dst_dir/usr" ] ; then
- find $dst_dir/usr -type d | xargs rmdir --ignore-fail-on-non-empty
- rmdir --ignore-fail-on-non-empty $dst_dir/usr
-fi
-
-exit 0
+++ /dev/null
-#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-$(call include_mk, python3-version.mk)
-
-PYTHON3_DIR:=$(STAGING_DIR)/usr
-PYTHON3_BIN_DIR:=$(PYTHON3_DIR)/bin
-PYTHON3_INC_DIR:=$(PYTHON3_DIR)/include/python$(PYTHON3_VERSION)
-PYTHON3_LIB_DIR:=$(PYTHON3_DIR)/lib/python$(PYTHON3_VERSION)
-
-PYTHON3_PKG_DIR:=/usr/lib/python$(PYTHON3_VERSION)/site-packages
-
-PYTHON3:=python$(PYTHON3_VERSION)
-
-PYTHON3PATH:=$(PYTHON3_LIB_DIR):$(STAGING_DIR)/$(PYTHON3_PKG_DIR):$(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)
-
-# These configure args are needed in detection of path to Python header files
-# using autotools.
-CONFIGURE_ARGS += \
- _python_sysroot="$(STAGING_DIR)" \
- _python_prefix="/usr" \
- _python_exec_prefix="/usr"
-
-PKG_USE_MIPS16:=0
-# This is required in addition to PKG_USE_MIPS16:=0 because otherwise MIPS16
-# flags are inherited from the Python base package (via sysconfig module)
-ifdef CONFIG_USE_MIPS16
- TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16
-endif
-
-define Py3Package
-
- define Package/$(1)-src
- $(call Package/$(1))
- TITLE+= (sources)
- DEPENDS:=$$$$(foreach dep,$$$$(filter +python3-%,$$$$(DEPENDS)),$$$$(dep)-src)
- endef
-
- define Package/$(1)-src/description
- $(call Package/$(1)/description).
- (Contains the Python3 sources for this package).
- endef
-
- # Add default PyPackage filespec none defined
- ifndef Py3Package/$(1)/filespec
- define Py3Package/$(1)/filespec
- +|$(PYTHON3_PKG_DIR)
- endef
- endif
-
- ifndef Py3Package/$(1)/install
- define Py3Package/$(1)/install
- if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then \
- $(INSTALL_DIR) $$(1)/usr/bin ; \
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $$(1)/usr/bin/ ; \
- fi
- endef
- endif
-
- ifndef Package/$(1)/install
- $(call shexport,Py3Package/$(1)/filespec)
-
- define Package/$(1)/install
- $(call Py3Package/$(1)/install,$$(1))
- find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
- if [ -e files/python3-package-install.sh ] ; then \
- $(SHELL) files/python3-package-install.sh \
- "$(PKG_INSTALL_DIR)" "$$(1)" \
- "$(HOST_PYTHON3_BIN)" "$$(2)" \
- "$$$$$$$$$$(call shvar,Py3Package/$(1)/filespec)" ; \
- elif [ -e $(STAGING_DIR)/mk/python3-package-install.sh ] ; then \
- $(SHELL) $(STAGING_DIR)/mk/python3-package-install.sh \
- "$(PKG_INSTALL_DIR)" "$$(1)" \
- "$(HOST_PYTHON3_BIN)" "$$(2)" \
- "$$$$$$$$$$(call shvar,Py3Package/$(1)/filespec)" ; \
- else \
- echo "No 'python3-package-install.sh' script found" ; \
- exit 1 ; \
- fi
- endef
-
- define Package/$(1)-src/install
- $$(call Package/$(1)/install,$$(1),sources)
- endef
- endif # Package/$(1)/install
-endef
-
-$(call include_mk, python3-host.mk)
-
-# $(1) => commands to execute before running pythons script
-# $(2) => python script and its arguments
-# $(3) => additional variables
-define Build/Compile/HostPy3RunTarget
- $(call HostPython3, \
- $(if $(1),$(1);) \
- CC="$(TARGET_CC)" \
- CCSHARED="$(TARGET_CC) $(FPIC)" \
- CXX="$(TARGET_CXX)" \
- LD="$(TARGET_CC)" \
- LDSHARED="$(TARGET_CC) -shared" \
- CFLAGS="$(TARGET_CFLAGS)" \
- CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON3_INC_DIR)" \
- LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON3_VERSION)" \
- _PYTHON_HOST_PLATFORM=linux2 \
- __PYVENV_LAUNCHER__="/usr/bin/$(PYTHON3)" \
- $(3) \
- , \
- $(2) \
- )
-endef
-
-# $(1) => build subdir
-# $(2) => additional arguments to setup.py
-# $(3) => additional variables
-define Build/Compile/Py3Mod
- $(INSTALL_DIR) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)
- $(call Build/Compile/HostPy3RunTarget, \
- cd $(PKG_BUILD_DIR)/$(strip $(1)), \
- ./setup.py $(2), \
- $(3))
- find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
-endef
-
-define Py3Build/Compile/Default
- $(foreach pkg,$(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS),
- $(call host_python3_pip_install_host,$(pkg))
- )
- $(call Build/Compile/Py3Mod,, \
- install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
- --single-version-externally-managed \
- )
-endef
-
-Py3Build/Compile=$(Py3Build/Compile/Default)
-
-ifeq ($(BUILD_VARIANT),python3)
-define Build/Compile
- $(call Py3Build/Compile)
-endef
-endif # python3
+++ /dev/null
-#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-# Note: keep in sync with setuptools & pip
-PYTHON3_VERSION_MAJOR:=3
-PYTHON3_VERSION_MINOR:=6
-PYTHON3_VERSION_MICRO:=4
-
-PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
-
-PYTHON3_SETUPTOOLS_VERSION:=28.8.0
-PYTHON3_PIP_VERSION:=9.0.1
-
PKG_HASH:=f5c056e8f62d45ba8215e5cb8f50dfccb198b4b9fbea8500674f3443e4689589
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/pytz
SUBMENU:=Python
PKG_MIRROR_HASH:=a52728cc5653bf3c2a2f92954c6001338442a6e589bd364c497ba615c4365211
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/rcssmin
SUBMENU:=Python
PKG_HASH:=01a22d49ddd9a168b136f26cac87d9a335660ce07aa5c630b8e3607d6f4325e7
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/simplejson
SUBMENU:=Python
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/twisted
SUBMENU:=Python
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
define Package/zope-interface
SECTION:=lang
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
-$(call include_mk, python-package.mk)
+include ../../lang/python/python-package.mk
define Package/libimobiledevice/Default
TITLE:=A library that talks to Apple devices.
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
-$(call include_mk, python-package.mk)
+include ../../lang/python/python-package.mk
define Package/libsearpc
SECTION:=libs
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../../lang/python/python-package.mk
define Package/danish
SECTION:=net
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../../lang/python/python-package.mk
define Package/obfsproxy
SECTION:=net
SUPPORTED_KERNELS:=LINUX_3_18||LINUX_4_1||LINUX_4_3||LINUX_4_4||LINUX_4_9
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../../lang/python/python-package.mk
define Package/openvswitch/Default
SECTION:=net
PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../../lang/python/python-package.mk
+include ../../lang/python/python3-package.mk
# no default dependencies
PKG_DEFAULT_DEPENDS:=
PKG_HASH:=8972c02e39a826a10c02c2bdd5025f7251dce9589c57befd9bb55c65f02e4934
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../../lang/python/python-package.mk
define Package/scapy
SECTION:=net
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
-$(call include_mk, python-package.mk)
+include ../../lang/python/python-package.mk
define Package/seafile-ccnet
SECTION:=net
PKG_MIRROR_HASH:=511500c40dd7b1009f77109c6df810df1cf2c17a84a8f6841d592a9e05d22064
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../../lang/python/python-package.mk
define Package/seafile-seahub
SECTION:=net
+++ seafile-seahub-6.2.2/Makefile 2017-10-22 22:46:18.007470936 +0200
@@ -1,3 +1,6 @@
+include $(TOPDIR)/rules.mk
-+$(call include_mk, python-package.mk)
++include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
+
PROJECT=seahub
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
-$(call include_mk, python-package.mk)
+include ../../lang/python/python-package.mk
define Package/seafile-server
SECTION:=net
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
-$(call include_mk, python3-package.mk)
+include ../../lang/python/python-package.mk
+include ../../lang/python/python3-package.mk
define Package/i2c/Default
URL:=http://lm-sensors.org/wiki/I2CTools