Browse Source

python3: update using python updates as template

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Alexandru Ardelean 10 years ago
parent
commit
8c057f39d8
3 changed files with 17 additions and 9 deletions
  1. 1
    2
      lang/python/Makefile
  2. 4
    4
      lang/python3/Makefile
  3. 12
    3
      lang/python3/files/python3-package.mk

+ 1
- 2
lang/python/Makefile View File

@@ -115,8 +115,7 @@ define Build/InstallDev
115 115
 		$(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
116 116
 		$(1)/usr/lib/
117 117
 	$(CP) \
118
-		$(STAGING_DIR_HOST)/lib/pkgconfig/python.pc \
119
-		$(STAGING_DIR_HOST)/lib/pkgconfig/python2.pc \
118
+		$(STAGING_DIR_HOST)/lib/pkgconfig/python3.pc \
120 119
 		$(STAGING_DIR_HOST)/lib/pkgconfig/python-$(PYTHON_VERSION).pc \
121 120
 		$(1)/usr/lib/pkgconfig
122 121
 	$(CP) \

+ 4
- 4
lang/python3/Makefile View File

@@ -31,7 +31,7 @@ HOST_BUILD_PARALLEL:=1
31 31
 PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
32 32
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
33 33
 
34
-PKG_BUILD_DEPENDS:=libffi/host python3/host
34
+PKG_BUILD_DEPENDS:=python3/host
35 35
 
36 36
 include $(INCLUDE_DIR)/host-build.mk
37 37
 include $(INCLUDE_DIR)/package.mk
@@ -57,7 +57,7 @@ endef
57 57
 define Package/python3-base
58 58
 $(call Package/python3/Default)
59 59
   TITLE:=Python $(PYTHON_VERSION) interpreter
60
-  DEPENDS:=+libpthread +zlib +libffi
60
+  DEPENDS:=+libpthread +zlib +libffi +libopenssl
61 61
 endef
62 62
 
63 63
 define Package/python3-base/description
@@ -67,7 +67,7 @@ endef
67 67
 
68 68
 define Package/python3
69 69
 $(call Package/python3/Default)
70
-  DEPENDS:=+python3-base +libncursesw +libbz2 +libgdbm +libsqlite3 +libdb47 +libopenssl
70
+  DEPENDS:=+python3-base +libncursesw +libbz2 +libgdbm +libsqlite3 +libdb47
71 71
 endef
72 72
 
73 73
 define Package/python3/description
@@ -170,9 +170,9 @@ endef
170 170
 HOST_CONFIGURE_ARGS+= \
171 171
 	--without-cxx-main \
172 172
 	--without-pymalloc \
173
-	--without-ensurepip \
174 173
 	--with-threads \
175 174
 	--prefix=$(STAGING_DIR_HOST) \
175
+	--with-ensurepip=upgrade \
176 176
 	CONFIG_SITE= \
177 177
 	OPT="$(HOST_CFLAGS)"
178 178
 

+ 12
- 3
lang/python3/files/python3-package.mk View File

@@ -20,8 +20,7 @@ PYTHON3:=python$(PYTHON3_VERSION)
20 20
 HOST_PYTHON3_LIB_DIR:=$(STAGING_DIR_HOST)/lib/python$(PYTHON3_VERSION)
21 21
 HOST_PYTHON3_BIN:=$(STAGING_DIR_HOST)/bin/python3
22 22
 
23
-PYTHON3PATH:=$(PYTHON3_LIB_DIR):$(STAGING_DIR)/$(PYTHON3_PKG_DIR)
24
-PYTHON3PATH+=:$(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)
23
+PYTHON3PATH:=$(PYTHON3_LIB_DIR):$(STAGING_DIR)/$(PYTHON3_PKG_DIR):$(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)
25 24
 define HostPython3
26 25
 	(	export PYTHONPATH="$(PYTHON3PATH)"; \
27 26
 		export PYTHONOPTIMIZE=""; \
@@ -39,6 +38,14 @@ ifdef CONFIG_USE_MIPS16
39 38
 endif
40 39
 
41 40
 define Py3Package
41
+
42
+  # Add default PyPackage filespec none defined
43
+  ifndef Py3Package/$(1)/filespec
44
+    define Py3Package/$(1)/filespec
45
+      +|$(PYTHON3_PKG_DIR)
46
+    endef
47
+  endif
48
+
42 49
   $(call shexport,Py3Package/$(1)/filespec)
43 50
 
44 51
   define Package/$(1)/install
@@ -46,6 +53,7 @@ define Py3Package
46 53
 	@echo "$$$$$$$$$$(call shvar,Py3Package/$(1)/filespec)" | ( \
47 54
 		IFS='|'; \
48 55
 		while read fop fspec fperm; do \
56
+		  fop=`echo "$$$$$$$$fop" | tr -d ' \t\n'`; \
49 57
 		  if [ "$$$$$$$$fop" = "+" ]; then \
50 58
 			if [ ! -e "$(PKG_INSTALL_DIR)$$$$$$$$fspec" ]; then \
51 59
 			  echo "File not found '$(PKG_INSTALL_DIR)$$$$$$$$fspec'"; \
@@ -90,7 +98,7 @@ define Build/Compile/Py3Mod
90 98
 		CFLAGS="$(TARGET_CFLAGS)" \
91 99
 		CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON3_INC_DIR)" \
92 100
 		LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON3_VERSION)" \
93
-		_PYTHON_HOST_PLATFORM="linux-$(ARCH)" \
101
+		_PYTHON_HOST_PLATFORM=linux2 \
94 102
 		__PYVENV_LAUNCHER__="/usr/bin/$(PYTHON3)" \
95 103
 		$(3) \
96 104
 		, \
@@ -98,3 +106,4 @@ define Build/Compile/Py3Mod
98 106
 	)
99 107
 	find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
100 108
 endef
109
+