summaryrefslogtreecommitdiff
path: root/lang/python3/files/python3-package.mk
diff options
context:
space:
mode:
authorsbyx <steven@midlink.org>2014-10-21 08:55:16 +0200
committersbyx <steven@midlink.org>2014-10-21 08:55:16 +0200
commitb87f4d359e7c1ae84d542db45f3b56bad3f5988a (patch)
tree77e123622ec3f498be55a4d2c7f2e386c4181860 /lang/python3/files/python3-package.mk
parentfec6a37989d3a7e1092da1ab919c2789973f2b5b (diff)
parent056e565ab646f991ad7b3a9dd95f63ad50248f3b (diff)
Merge pull request #450 from commodo/python3-update-1-2-3
Python3 update 1 2 3
Diffstat (limited to 'lang/python3/files/python3-package.mk')
-rw-r--r--lang/python3/files/python3-package.mk14
1 files changed, 12 insertions, 2 deletions
diff --git a/lang/python3/files/python3-package.mk b/lang/python3/files/python3-package.mk
index e85b64819..e2e71d3e0 100644
--- a/lang/python3/files/python3-package.mk
+++ b/lang/python3/files/python3-package.mk
@@ -32,10 +32,15 @@ define Py3Package
$(call shexport,Py3Package/$(1)/filespec)
define Package/$(1)/install
+ find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
@$(SH_FUNC) getvar $$(call shvar,Py3Package/$(1)/filespec) | ( \
IFS='|'; \
while read fop fspec fperm; do \
if [ "$$$$$$$$fop" = "+" ]; then \
+ if [ ! -e "$(PKG_INSTALL_DIR)$$$$$$$$fspec" ]; then \
+ echo "File not found '$(PKG_INSTALL_DIR)$$$$$$$$fspec'"; \
+ exit 1; \
+ fi; \
dpath=`dirname "$$$$$$$$fspec"`; \
if [ -n "$$$$$$$$fperm" ]; then \
dperm="-m$$$$$$$$fperm"; \
@@ -67,9 +72,14 @@ endef
define Build/Compile/Py3Mod
$(call HostPython3, \
cd $(PKG_BUILD_DIR)/$(strip $(1)); \
+ CC="$(TARGET_CC)" \
+ CCSHARED="$(TARGET_CC) $(FPIC)" \
+ LD="$(TARGET_CC)" \
+ LDSHARED="$(TARGET_CC) -shared" \
CFLAGS="$(TARGET_CFLAGS)" \
- CPPFLAGS="$(TARGET_CPPFLAGS)" \
- LDFLAGS="$(TARGET_LDFLAGS)" \
+ CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON3_INC_DIR)" \
+ LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON3_VERSION)" \
+ _PYTHON_HOST_PLATFORM="linux-$(ARCH)" \
$(3) \
, \
./setup.py $(2) \