diff --git a/lang/python/Flask/Makefile b/lang/python/Flask/Makefile
index 6ff14a258..5e9dcd51c 100644
--- a/lang/python/Flask/Makefile
+++ b/lang/python/Flask/Makefile
@@ -20,7 +20,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
 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
diff --git a/lang/python/Jinja2/Makefile b/lang/python/Jinja2/Makefile
index 8b6256961..7ef9e0b8a 100644
--- a/lang/python/Jinja2/Makefile
+++ b/lang/python/Jinja2/Makefile
@@ -20,7 +20,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
 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
diff --git a/lang/python/MarkupSafe/Makefile b/lang/python/MarkupSafe/Makefile
index 0083516e4..84cd18427 100644
--- a/lang/python/MarkupSafe/Makefile
+++ b/lang/python/MarkupSafe/Makefile
@@ -20,7 +20,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
 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
diff --git a/lang/python/Werkzeug/Makefile b/lang/python/Werkzeug/Makefile
index 8192a61de..0f4a51a1e 100644
--- a/lang/python/Werkzeug/Makefile
+++ b/lang/python/Werkzeug/Makefile
@@ -20,7 +20,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
 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
diff --git a/lang/python/chardet/Makefile b/lang/python/chardet/Makefile
index 72f09d6f5..27020c759 100644
--- a/lang/python/chardet/Makefile
+++ b/lang/python/chardet/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://pypi.python.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0
 PKG_HASH:=84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/chardet
   SUBMENU:=Python
diff --git a/lang/python/click/Makefile b/lang/python/click/Makefile
index e52e99938..021357895 100644
--- a/lang/python/click/Makefile
+++ b/lang/python/click/Makefile
@@ -20,7 +20,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
 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
diff --git a/lang/python/django-appconf/Makefile b/lang/python/django-appconf/Makefile
index 4635cf577..874e850be 100644
--- a/lang/python/django-appconf/Makefile
+++ b/lang/python/django-appconf/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://pypi.python.org/packages/34/b9/d07195652ab494b026f7cb034
 PKG_HASH:=6a4d9aea683b4c224d97ab8ee11ad2d29a37072c0c6c509896dd9857466fb261
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/django-appconf
   SUBMENU:=Python
diff --git a/lang/python/django-compressor/Makefile b/lang/python/django-compressor/Makefile
index 8a14a3dd3..19e0f3e78 100644
--- a/lang/python/django-compressor/Makefile
+++ b/lang/python/django-compressor/Makefile
@@ -18,7 +18,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/django_compressor-$(PKG_VERSION)/
 PKG_HASH:=9616570e5b08e92fa9eadc7a1b1b49639cce07ef392fc27c74230ab08075b30f
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/django-compressor
   SUBMENU:=Python
diff --git a/lang/python/django-constance/Makefile b/lang/python/django-constance/Makefile
index 7d8a7e1e9..359ae8ba4 100644
--- a/lang/python/django-constance/Makefile
+++ b/lang/python/django-constance/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://pypi.python.org/packages/8a/37/4fa87dd0e43aa0a66fc419d58
 PKG_HASH:=6eec9f3ac4e5657b93e64f3379181d1e727088df10dd34f0398cd12119b9f0b0
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/django-constance
   SUBMENU:=Python
diff --git a/lang/python/django-jsonfield/Makefile b/lang/python/django-jsonfield/Makefile
index cd9a9a765..d3796d2c8 100644
--- a/lang/python/django-jsonfield/Makefile
+++ b/lang/python/django-jsonfield/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://pypi.python.org/packages/e4/b2/a079f0a2218e0eb7892edbf40
 PKG_HASH:=6c0afd5554739365b55d86e285cf966cc3a45682fff963463364ea1f6511ca3e
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/django-jsonfield
   SUBMENU:=Python
diff --git a/lang/python/django-picklefield/Makefile b/lang/python/django-picklefield/Makefile
index 61438ce6c..4566cc6a1 100644
--- a/lang/python/django-picklefield/Makefile
+++ b/lang/python/django-picklefield/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://pypi.python.org/packages/e8/69/232d78ef16cad8dd4c2f871b0
 PKG_HASH:=61e3ba7f6df82d8df9e6be3a8c55ef589eb3bf926c3d25d2b7949b07eae78354
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/django-picklefield
   SUBMENU:=Python
diff --git a/lang/python/django-postoffice/Makefile b/lang/python/django-postoffice/Makefile
index ac594a56a..f3519f41f 100644
--- a/lang/python/django-postoffice/Makefile
+++ b/lang/python/django-postoffice/Makefile
@@ -18,7 +18,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/django-post_office-$(PKG_VERSION)/
 PKG_HASH:=8d691b2e53ba8121d770ce448f05568874cf78a3cf63215918ad49536db5e76a
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/django-postoffice
   SUBMENU:=Python
diff --git a/lang/python/django-restframework/Makefile b/lang/python/django-restframework/Makefile
index d1d22102e..fb37b0e95 100644
--- a/lang/python/django-restframework/Makefile
+++ b/lang/python/django-restframework/Makefile
@@ -18,7 +18,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/djangorestframework-$(PKG_VERSION)
 PKG_HASH:=305b2c6564ca46d3b558ba21110ed717135c467adf1a6dfd192bd85f4bb04d50
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/django-restframework
   SUBMENU:=Python
diff --git a/lang/python/django-statici18n/Makefile b/lang/python/django-statici18n/Makefile
index 51b707440..a93a022e6 100644
--- a/lang/python/django-statici18n/Makefile
+++ b/lang/python/django-statici18n/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://pypi.python.org/packages/29/4d/fd9ba0e9b86c05714d9bc945d
 PKG_HASH:=3cb5334d42cfabda49c9c0efb1c24f5663e318ed34b3a34fada5195232f75f65
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/django-statici18n
   SUBMENU:=Python
diff --git a/lang/python/django/Makefile b/lang/python/django/Makefile
index 43e657131..6d59cdd71 100644
--- a/lang/python/django/Makefile
+++ b/lang/python/django/Makefile
@@ -20,7 +20,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 PKG_MIRROR_HASH:=c82c2cc338ae46ba8572d9960fc98dca932edc43a00f011fed102810a86185ae
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/django
     SUBMENU:=Python
diff --git a/lang/python/et_xmlfile/Makefile b/lang/python/et_xmlfile/Makefile
index b10492639..ae706811f 100644
--- a/lang/python/et_xmlfile/Makefile
+++ b/lang/python/et_xmlfile/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=http://pypi.python.org/packages/source/e/et_xmlfile/
 PKG_HASH:=614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/et_xmlfile
   SUBMENU:=Python
diff --git a/lang/python/flup/Makefile b/lang/python/flup/Makefile
index baf4f8937..4a0142f32 100644
--- a/lang/python/flup/Makefile
+++ b/lang/python/flup/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=http://pypi.python.org/packages/source/f/flup/
 PKG_HASH:=4bad317a5fc1ce3d4fe5e9b6d846ec38a8023e16876785d4f88102f2c8097dd9
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/flup
   SUBMENU:=Python
diff --git a/lang/python/gunicorn/Makefile b/lang/python/gunicorn/Makefile
index 73c224bfa..4ba2fc61b 100644
--- a/lang/python/gunicorn/Makefile
+++ b/lang/python/gunicorn/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://pypi.python.org/packages/30/3a/10bb213cede0cc4d13ac22633
 PKG_HASH:=eee1169f0ca667be05db3351a0960765620dad53f53434262ff8901b68a1b622
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/gunicorn
     SUBMENU:=Python
diff --git a/lang/python/itsdangerous/Makefile b/lang/python/itsdangerous/Makefile
index e52603df2..e1e432ef4 100644
--- a/lang/python/itsdangerous/Makefile
+++ b/lang/python/itsdangerous/Makefile
@@ -20,7 +20,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
 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
diff --git a/lang/python/jdcal/Makefile b/lang/python/jdcal/Makefile
index 367b993b0..2fba8a64d 100644
--- a/lang/python/jdcal/Makefile
+++ b/lang/python/jdcal/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://pypi.python.org/packages/9b/fa/40beb2aa43a13f740dd5be367
 PKG_HASH:=b760160f8dc8cc51d17875c6b663fafe64be699e10ce34b6a95184b5aa0fdc9e
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/jdcal
   SUBMENU:=Python
diff --git a/lang/python/openpyxl/Makefile b/lang/python/openpyxl/Makefile
index 82de86a20..93a3f0636 100644
--- a/lang/python/openpyxl/Makefile
+++ b/lang/python/openpyxl/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://pypi.python.org/packages/88/3c/34fbe561fc92e6a75f297478b
 PKG_HASH:=3b42ece7933b46b2128f8d4111c57c80fb5aa46f4d16e7f83281f169e7398ba7
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/openpyxl
   SUBMENU:=Python
diff --git a/lang/python/pillow/Makefile b/lang/python/pillow/Makefile
index 5e16b1454..c1618e2f7 100644
--- a/lang/python/pillow/Makefile
+++ b/lang/python/pillow/Makefile
@@ -20,7 +20,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 PKG_MIRROR_HASH:=e7c36bcf89614337d9abc4d07780da0b346a745be7a9aa55b398fa427549273c
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/pillow
     SUBMENU:=Python
diff --git a/lang/python/pyodbc/Makefile b/lang/python/pyodbc/Makefile
index 01371ad95..aec3e7e63 100644
--- a/lang/python/pyodbc/Makefile
+++ b/lang/python/pyodbc/Makefile
@@ -20,8 +20,8 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
 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
diff --git a/lang/python/python-asn1crypto/Makefile b/lang/python/python-asn1crypto/Makefile
index 7998a5a42..73e2f6305 100644
--- a/lang/python/python-asn1crypto/Makefile
+++ b/lang/python/python-asn1crypto/Makefile
@@ -21,8 +21,8 @@ PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 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)
 
diff --git a/lang/python/python-attrs/Makefile b/lang/python/python-attrs/Makefile
index 9c3e6886c..3911a1d34 100644
--- a/lang/python/python-attrs/Makefile
+++ b/lang/python/python-attrs/Makefile
@@ -22,8 +22,8 @@ PKG_LICENSE_FILES:=LICENSE
 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)
 
diff --git a/lang/python/python-cffi/Makefile b/lang/python/python-cffi/Makefile
index fd49f2e99..8549a439f 100644
--- a/lang/python/python-cffi/Makefile
+++ b/lang/python/python-cffi/Makefile
@@ -27,8 +27,8 @@ HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)"
 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)
 
diff --git a/lang/python/python-crcmod/Makefile b/lang/python/python-crcmod/Makefile
index 3ad025845..a4873ccad 100644
--- a/lang/python/python-crcmod/Makefile
+++ b/lang/python/python-crcmod/Makefile
@@ -21,7 +21,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/crcmod-$(PKG_VERSION)
 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
diff --git a/lang/python/python-crypto/Makefile b/lang/python/python-crypto/Makefile
index cdc5eebcf..8d4aaefce 100644
--- a/lang/python/python-crypto/Makefile
+++ b/lang/python/python-crypto/Makefile
@@ -20,7 +20,7 @@ PKG_LICENSE_FILES:=COPYRIGHT
 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
diff --git a/lang/python/python-cryptography/Makefile b/lang/python/python-cryptography/Makefile
index acae27fe7..73064d396 100644
--- a/lang/python/python-cryptography/Makefile
+++ b/lang/python/python-cryptography/Makefile
@@ -22,8 +22,8 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleana
 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)
 
diff --git a/lang/python/python-curl/Makefile b/lang/python/python-curl/Makefile
index f325560a4..12bff8fd4 100644
--- a/lang/python/python-curl/Makefile
+++ b/lang/python/python-curl/Makefile
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=https://dl.bintray.com/pycurl/pycurl/
 PKG_HASH:=43231bf2bafde923a6d9bb79e2407342a5f3382c1ef0a3b2e491c6a4e50b91aa
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/python-curl
   CATEGORY:=Languages
diff --git a/lang/python/python-dateutil/Makefile b/lang/python/python-dateutil/Makefile
index 8b799b53d..421758a55 100644
--- a/lang/python/python-dateutil/Makefile
+++ b/lang/python/python-dateutil/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://pypi.python.org/packages/54/bb/f1db86504f7a49e1d9b930153
 PKG_HASH:=891c38b2a02f5bb1be3e4793866c8df49c7d19baabf9c1bad62547e0b4866aca
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/python-dateutil
   SUBMENU:=Python
diff --git a/lang/python/python-dns/Makefile b/lang/python/python-dns/Makefile
index 847ad9db0..545a170e3 100644
--- a/lang/python/python-dns/Makefile
+++ b/lang/python/python-dns/Makefile
@@ -19,7 +19,7 @@ PKG_LICENSE_FILES:=LICENSE
 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
diff --git a/lang/python/python-dpkt/Makefile b/lang/python/python-dpkt/Makefile
index cf0c31530..e6b041798 100644
--- a/lang/python/python-dpkt/Makefile
+++ b/lang/python/python-dpkt/Makefile
@@ -21,7 +21,7 @@ PKG_MIRROR_HASH:=fe8657552b1dbaf8b9eba50168730e200567dc88a06932aa1cf60dc93211d16
 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
diff --git a/lang/python/python-egenix-mx-base/Makefile b/lang/python/python-egenix-mx-base/Makefile
index f6c806fd1..374258cda 100644
--- a/lang/python/python-egenix-mx-base/Makefile
+++ b/lang/python/python-egenix-mx-base/Makefile
@@ -22,7 +22,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/egenix-mx-base-$(PKG_VERSION)
 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
diff --git a/lang/python/python-enum34/Makefile b/lang/python/python-enum34/Makefile
index bc419705e..165ec909d 100644
--- a/lang/python/python-enum34/Makefile
+++ b/lang/python/python-enum34/Makefile
@@ -20,7 +20,7 @@ PKG_LICENSE_FILES:=enum/LICENSE
 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
diff --git a/lang/python/python-evdev/Makefile b/lang/python/python-evdev/Makefile
index bb2acb641..4bdf5212f 100644
--- a/lang/python/python-evdev/Makefile
+++ b/lang/python/python-evdev/Makefile
@@ -22,8 +22,8 @@ PKG_HASH:=57edafc469a414f58b51af1bfb9ee2babb9f626dd2df530d71c1176871850aa1
 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)
 
diff --git a/lang/python/python-gmpy2/Makefile b/lang/python/python-gmpy2/Makefile
index b517c8783..991741365 100644
--- a/lang/python/python-gmpy2/Makefile
+++ b/lang/python/python-gmpy2/Makefile
@@ -22,8 +22,8 @@ PKG_LICENSE_FILES:=COPYING.LESSER
 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)
 
diff --git a/lang/python/python-gnupg/Makefile b/lang/python/python-gnupg/Makefile
index 408464bf4..0c209a751 100644
--- a/lang/python/python-gnupg/Makefile
+++ b/lang/python/python-gnupg/Makefile
@@ -20,8 +20,8 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
 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
diff --git a/lang/python/python/files/python-host.mk b/lang/python/python-host.mk
similarity index 90%
rename from lang/python/python/files/python-host.mk
rename to lang/python/python-host.mk
index e836eae71..d4dc81fa9 100644
--- a/lang/python/python/files/python-host.mk
+++ b/lang/python/python-host.mk
@@ -5,11 +5,15 @@
 # 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
-$(call include_mk, python-version.mk)
+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)
diff --git a/lang/python/python-idna/Makefile b/lang/python/python-idna/Makefile
index 3d17183a5..d5af7d39d 100644
--- a/lang/python/python-idna/Makefile
+++ b/lang/python/python-idna/Makefile
@@ -22,8 +22,8 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleana
 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)
 
diff --git a/lang/python/python-ipaddress/Makefile b/lang/python/python-ipaddress/Makefile
index d4fecf772..77e97e769 100644
--- a/lang/python/python-ipaddress/Makefile
+++ b/lang/python/python-ipaddress/Makefile
@@ -19,7 +19,7 @@ PKG_LICENSE:=Python-2.0
 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
diff --git a/lang/python/python-ldap/Makefile b/lang/python/python-ldap/Makefile
index 62b19046c..a8d983de3 100644
--- a/lang/python/python-ldap/Makefile
+++ b/lang/python/python-ldap/Makefile
@@ -19,7 +19,7 @@ PKG_SOURCE_URL:=https://pypi.python.org/packages/67/d9/fa0ea70d1792875745116ad62
 PKG_HASH:=5810f1b5a9ae9255df99fb9c2dcab7352fed325687efda56c0faae1a82c5e3cb
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/python-ldap
   SUBMENU:=Python
diff --git a/lang/python/python-lxml/Makefile b/lang/python/python-lxml/Makefile
index 3e228bb60..0c543fce4 100644
--- a/lang/python/python-lxml/Makefile
+++ b/lang/python/python-lxml/Makefile
@@ -23,8 +23,8 @@ PKG_LICENSE_FILES:=LICENSES.txt
 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
diff --git a/lang/python/python-mysql/Makefile b/lang/python/python-mysql/Makefile
index 596ac3844..f776b74bb 100644
--- a/lang/python/python-mysql/Makefile
+++ b/lang/python/python-mysql/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://pypi.python.org/packages/source/M/MySQL-python/
 PKG_HASH:=811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e140c74
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/python-mysql
   SUBMENU:=Python
diff --git a/lang/python/python/files/python-package-install.sh b/lang/python/python-package-install.sh
similarity index 92%
rename from lang/python/python/files/python-package-install.sh
rename to lang/python/python-package-install.sh
index 60c1e273c..d5a50322f 100644
--- a/lang/python/python/files/python-package-install.sh
+++ b/lang/python/python-package-install.sh
@@ -35,11 +35,12 @@ process_filespec() {
 	)
 }
 
-src_dir="$1"
-dst_dir="$2"
-python="$3"
-mode="$4"
-filespec="$5"
+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"
@@ -58,13 +59,16 @@ if [ "$mode" == "sources" ] ; then
 	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 -d '/' $dst_dir || {
+$python -m compileall $legacy -d '/' $dst_dir || {
 	echo "python -m compileall err-ed"
 	exit 1
 }
diff --git a/lang/python/python/files/python-package.mk b/lang/python/python-package.mk
similarity index 84%
rename from lang/python/python/files/python-package.mk
rename to lang/python/python-package.mk
index 9c231f6ec..8bfd5e37f 100644
--- a/lang/python/python/files/python-package.mk
+++ b/lang/python/python-package.mk
@@ -5,7 +5,10 @@
 # See /LICENSE for more information.
 #
 
-$(call include_mk, python-version.mk)
+# 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
@@ -67,20 +70,10 @@ define PyPackage
   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
+	$(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
@@ -89,8 +82,6 @@ define PyPackage
   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
diff --git a/lang/python/python-packages/Makefile b/lang/python/python-packages/Makefile
index 7686e3834..cefc2cb86 100644
--- a/lang/python/python-packages/Makefile
+++ b/lang/python/python-packages/Makefile
@@ -32,7 +32,7 @@ PKG_CONFIG_DEPENDS:= \
 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
diff --git a/lang/python/python-parsley/Makefile b/lang/python/python-parsley/Makefile
index 11e231ab0..ab915ac32 100644
--- a/lang/python/python-parsley/Makefile
+++ b/lang/python/python-parsley/Makefile
@@ -22,8 +22,8 @@ PKG_LICENSE_FILES:=LICENSE
 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)
 
diff --git a/lang/python/python-pcapy/Makefile b/lang/python/python-pcapy/Makefile
index 712361aeb..c1dc932c2 100644
--- a/lang/python/python-pcapy/Makefile
+++ b/lang/python/python-pcapy/Makefile
@@ -21,7 +21,7 @@ PKG_SOURCE_VERSION:=b91a418374d1636408c435f11799ef725ef70097
 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
diff --git a/lang/python/python-ply/Makefile b/lang/python/python-ply/Makefile
index 212fdb03b..1d42831a1 100644
--- a/lang/python/python-ply/Makefile
+++ b/lang/python/python-ply/Makefile
@@ -22,8 +22,8 @@ PKG_LICENSE_FILES:=README.md
 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)
 
diff --git a/lang/python/python-psycopg2/Makefile b/lang/python/python-psycopg2/Makefile
index 270bc8aff..4feaf39b4 100644
--- a/lang/python/python-psycopg2/Makefile
+++ b/lang/python/python-psycopg2/Makefile
@@ -22,7 +22,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/psycopg2-$(PKG_VERSION)
 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
diff --git a/lang/python/python-pyasn1-modules/Makefile b/lang/python/python-pyasn1-modules/Makefile
index c76e48a26..1407053c3 100644
--- a/lang/python/python-pyasn1-modules/Makefile
+++ b/lang/python/python-pyasn1-modules/Makefile
@@ -22,8 +22,8 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleana
 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)
 
diff --git a/lang/python/python-pyasn1/Makefile b/lang/python/python-pyasn1/Makefile
index 78f82c85d..5b002eeeb 100644
--- a/lang/python/python-pyasn1/Makefile
+++ b/lang/python/python-pyasn1/Makefile
@@ -22,8 +22,8 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleana
 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)
 
diff --git a/lang/python/python-pycparser/Makefile b/lang/python/python-pycparser/Makefile
index ffd54e7c0..7bdad5cc8 100644
--- a/lang/python/python-pycparser/Makefile
+++ b/lang/python/python-pycparser/Makefile
@@ -25,8 +25,8 @@ HOST_PYTHON_PACKAGE_BUILD_DEPENDS:="ply==3.10"
 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)
 
diff --git a/lang/python/python-pyopenssl/Makefile b/lang/python/python-pyopenssl/Makefile
index 6f427928f..f07b2b2e3 100644
--- a/lang/python/python-pyopenssl/Makefile
+++ b/lang/python/python-pyopenssl/Makefile
@@ -22,8 +22,8 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleana
 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)
 
diff --git a/lang/python/python-pyptlib/Makefile b/lang/python/python-pyptlib/Makefile
index 17ee7ade0..32c8971fb 100644
--- a/lang/python/python-pyptlib/Makefile
+++ b/lang/python/python-pyptlib/Makefile
@@ -20,7 +20,7 @@ PKG_LICENSE_FILES:=LICENSE
 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
diff --git a/lang/python/python-pyserial/Makefile b/lang/python/python-pyserial/Makefile
index 803884cc7..2342b0243 100644
--- a/lang/python/python-pyserial/Makefile
+++ b/lang/python/python-pyserial/Makefile
@@ -21,7 +21,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/pyserial-$(PKG_VERSION)
 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
diff --git a/lang/python/python-service-identity/Makefile b/lang/python/python-service-identity/Makefile
index df57dfe21..1f4f32d4f 100644
--- a/lang/python/python-service-identity/Makefile
+++ b/lang/python/python-service-identity/Makefile
@@ -20,7 +20,7 @@ PKG_LICENSE_FILES:=LICENSE
 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
diff --git a/lang/python/python-six/Makefile b/lang/python/python-six/Makefile
index ff91bde11..e59784064 100644
--- a/lang/python/python-six/Makefile
+++ b/lang/python/python-six/Makefile
@@ -25,8 +25,8 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleana
 
 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)
diff --git a/lang/python/python-txsocksx/Makefile b/lang/python/python-txsocksx/Makefile
index 9e6e716a3..c61586381 100644
--- a/lang/python/python-txsocksx/Makefile
+++ b/lang/python/python-txsocksx/Makefile
@@ -20,7 +20,7 @@ PKG_LICENSE_FILES:=COPYING
 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
diff --git a/lang/python/python-urllib3/Makefile b/lang/python/python-urllib3/Makefile
index ecb215862..e014fca09 100644
--- a/lang/python/python-urllib3/Makefile
+++ b/lang/python/python-urllib3/Makefile
@@ -18,7 +18,7 @@ PKG_SOURCE_URL:=https://pypi.python.org/packages/ee/11/7c59620aceedcc1ef65e156cc
 PKG_HASH:=cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/python-urllib3
   SUBMENU:=Python
diff --git a/lang/python/python/files/python-version.mk b/lang/python/python-version.mk
similarity index 100%
rename from lang/python/python/files/python-version.mk
rename to lang/python/python-version.mk
diff --git a/lang/python/python-yaml/Makefile b/lang/python/python-yaml/Makefile
index c6314c8b1..7846ce267 100644
--- a/lang/python/python-yaml/Makefile
+++ b/lang/python/python-yaml/Makefile
@@ -23,8 +23,8 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
 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
diff --git a/lang/python/python/Makefile b/lang/python/python/Makefile
index e7500f66d..84415d6bf 100644
--- a/lang/python/python/Makefile
+++ b/lang/python/python/Makefile
@@ -8,7 +8,7 @@
 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)
@@ -22,10 +22,10 @@ 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
 
 # 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
@@ -190,16 +190,6 @@ define Build/Compile
 	$(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)/
@@ -218,7 +208,6 @@ define Build/InstallDev
 	$(CP) \
 		$(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
 		$(1)/usr/lib/python$(PYTHON_VERSION)/
-	$(call Build/InstallMkFiles)
 endef
 
 PYTHON_BASE_LIB_FILES:= \
@@ -298,7 +287,6 @@ define Host/Compile
 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
diff --git a/lang/python/python3-bottle/Makefile b/lang/python/python3-bottle/Makefile
index 8436c3a79..f35913cbc 100644
--- a/lang/python/python3-bottle/Makefile
+++ b/lang/python/python3-bottle/Makefile
@@ -21,7 +21,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/bottle-$(PKG_VERSION)
 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
diff --git a/lang/python/python3/files/python3-host.mk b/lang/python/python3-host.mk
similarity index 90%
rename from lang/python/python3/files/python3-host.mk
rename to lang/python/python3-host.mk
index 4990d33a0..2a418d504 100644
--- a/lang/python/python3/files/python3-host.mk
+++ b/lang/python/python3-host.mk
@@ -5,11 +5,15 @@
 # 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
-$(call include_mk, python3-version.mk)
+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)
diff --git a/lang/python/python3/files/python3-package.mk b/lang/python/python3-package.mk
similarity index 84%
rename from lang/python/python3/files/python3-package.mk
rename to lang/python/python3-package.mk
index 93b14fac2..c5bfd71de 100644
--- a/lang/python/python3/files/python3-package.mk
+++ b/lang/python/python3-package.mk
@@ -5,7 +5,9 @@
 # See /LICENSE for more information.
 #
 
-$(call include_mk, python3-version.mk)
+# 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
@@ -67,20 +69,10 @@ define Py3Package
   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
+	$(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
@@ -89,8 +81,6 @@ define Py3Package
   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
diff --git a/lang/python/python3/files/python3-version.mk b/lang/python/python3-version.mk
similarity index 100%
rename from lang/python/python3/files/python3-version.mk
rename to lang/python/python3-version.mk
diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile
index 7ab3c51da..dbda239ab 100644
--- a/lang/python/python3/Makefile
+++ b/lang/python/python3/Makefile
@@ -8,7 +8,7 @@
 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)
@@ -25,10 +25,10 @@ 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
 
 # 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
@@ -194,16 +194,6 @@ define Build/Compile
 	$(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)/
@@ -217,7 +207,6 @@ define Build/InstallDev
 	$(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:= \
@@ -295,7 +284,6 @@ define Host/Compile
 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
diff --git a/lang/python/python3/files/python3-package-install.sh b/lang/python/python3/files/python3-package-install.sh
deleted file mode 100644
index 373f315a1..000000000
--- a/lang/python/python3/files/python3-package-install.sh
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/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
diff --git a/lang/python/pytz/Makefile b/lang/python/pytz/Makefile
index 3843653e5..4d9c3fd40 100644
--- a/lang/python/pytz/Makefile
+++ b/lang/python/pytz/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://pypi.python.org/packages/a4/09/c47e57fc9c7062b4e83b075d4
 PKG_HASH:=f5c056e8f62d45ba8215e5cb8f50dfccb198b4b9fbea8500674f3443e4689589
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/pytz
   SUBMENU:=Python
diff --git a/lang/python/rcssmin/Makefile b/lang/python/rcssmin/Makefile
index 10c434394..804b58576 100644
--- a/lang/python/rcssmin/Makefile
+++ b/lang/python/rcssmin/Makefile
@@ -20,7 +20,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 PKG_MIRROR_HASH:=a52728cc5653bf3c2a2f92954c6001338442a6e589bd364c497ba615c4365211
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/rcssmin
     SUBMENU:=Python
diff --git a/lang/python/simplejson/Makefile b/lang/python/simplejson/Makefile
index 21f051ff3..aa4c66212 100644
--- a/lang/python/simplejson/Makefile
+++ b/lang/python/simplejson/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://pypi.python.org/packages/08/48/c97b668d6da7d7bebe7ea1817
 PKG_HASH:=01a22d49ddd9a168b136f26cac87d9a335660ce07aa5c630b8e3607d6f4325e7
 
 include $(INCLUDE_DIR)/package.mk
-$(call include_mk, python-package.mk)
+include ../python-package.mk
 
 define Package/simplejson
   SUBMENU:=Python
diff --git a/lang/python/twisted/Makefile b/lang/python/twisted/Makefile
index 997e9718f..210569d2b 100644
--- a/lang/python/twisted/Makefile
+++ b/lang/python/twisted/Makefile
@@ -24,7 +24,7 @@ PKG_LICENSE_FILES:=LICENSE
 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
diff --git a/lang/python/zope-interface/Makefile b/lang/python/zope-interface/Makefile
index 737a6354e..d9a41a352 100644
--- a/lang/python/zope-interface/Makefile
+++ b/lang/python/zope-interface/Makefile
@@ -20,7 +20,7 @@ PKG_LICENSE_FILES:=LICENSE.txt
 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
diff --git a/libs/libimobiledevice/Makefile b/libs/libimobiledevice/Makefile
index ddc863813..b0d49838e 100644
--- a/libs/libimobiledevice/Makefile
+++ b/libs/libimobiledevice/Makefile
@@ -27,7 +27,7 @@ PKG_INSTALL:=1
 
 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.
diff --git a/libs/libsearpc/Makefile b/libs/libsearpc/Makefile
index bf05c6d92..b6cba6624 100644
--- a/libs/libsearpc/Makefile
+++ b/libs/libsearpc/Makefile
@@ -23,7 +23,7 @@ PKG_INSTALL:=1
 
 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
diff --git a/net/danish/Makefile b/net/danish/Makefile
index 0e6e2ccae..7b5959411 100644
--- a/net/danish/Makefile
+++ b/net/danish/Makefile
@@ -21,7 +21,7 @@ PKG_MIRROR_HASH:=cb0b4bb7a210091d807ee8e4a2876865f32a9bf195836eb2e1edf6c5975d113
 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
diff --git a/net/obfsproxy/Makefile b/net/obfsproxy/Makefile
index 80f0e02a3..fbf308e41 100644
--- a/net/obfsproxy/Makefile
+++ b/net/obfsproxy/Makefile
@@ -20,7 +20,7 @@ PKG_LICENSE_FILES:=LICENSE
 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
diff --git a/net/openvswitch/Makefile b/net/openvswitch/Makefile
index 6e8baa475..ee3cd0aaa 100644
--- a/net/openvswitch/Makefile
+++ b/net/openvswitch/Makefile
@@ -32,7 +32,7 @@ PKG_INSTALL:=1
 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
diff --git a/net/radicale/Makefile b/net/radicale/Makefile
index b3f60d183..513e0bbac 100644
--- a/net/radicale/Makefile
+++ b/net/radicale/Makefile
@@ -22,8 +22,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 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:=
diff --git a/net/scapy/Makefile b/net/scapy/Makefile
index ea066525e..c03a14e85 100644
--- a/net/scapy/Makefile
+++ b/net/scapy/Makefile
@@ -18,7 +18,7 @@ PKG_SOURCE_URL:=https://bitbucket.org/secdev/scapy/downloads/
 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
diff --git a/net/seafile-ccnet/Makefile b/net/seafile-ccnet/Makefile
index 30def93ea..64603ed8f 100644
--- a/net/seafile-ccnet/Makefile
+++ b/net/seafile-ccnet/Makefile
@@ -23,7 +23,7 @@ PKG_INSTALL:=1
 
 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
diff --git a/net/seafile-seahub/Makefile b/net/seafile-seahub/Makefile
index 332739cae..2cf27aef1 100644
--- a/net/seafile-seahub/Makefile
+++ b/net/seafile-seahub/Makefile
@@ -20,7 +20,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 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
diff --git a/net/seafile-seahub/patches/020-Makefile-fixes.patch b/net/seafile-seahub/patches/020-Makefile-fixes.patch
index c25f3d555..efae34d13 100644
--- a/net/seafile-seahub/patches/020-Makefile-fixes.patch
+++ b/net/seafile-seahub/patches/020-Makefile-fixes.patch
@@ -3,7 +3,7 @@ diff -rupN seafile-seahub-6.2.2.orig/Makefile seafile-seahub-6.2.2/Makefile
 +++ 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
  
diff --git a/net/seafile-server/Makefile b/net/seafile-server/Makefile
index 0a0506b38..12b2b2c47 100644
--- a/net/seafile-server/Makefile
+++ b/net/seafile-server/Makefile
@@ -23,7 +23,7 @@ PKG_INSTALL:=1
 
 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
diff --git a/utils/i2c-tools/Makefile b/utils/i2c-tools/Makefile
index c98ab8bbe..88dd6b3f6 100644
--- a/utils/i2c-tools/Makefile
+++ b/utils/i2c-tools/Makefile
@@ -25,8 +25,8 @@ PKG_LICENSE:=GPLv2
 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