python3: Add new packages python3-{dev,lib2to3}
authorFlorian Fieber <florian@florianfieber.de>
Mon, 8 Jun 2015 17:11:31 +0000 (19:11 +0200)
committerFlorian Fieber <florian@florianfieber.de>
Thu, 19 Nov 2015 17:26:30 +0000 (18:26 +0100)
Signed-off-by: Florian Fieber <florian@florianfieber.de>
lang/python3/Makefile
lang/python3/files/python3-package-dev.mk [new file with mode: 0644]
lang/python3/files/python3-package-lib2to3.mk [new file with mode: 0644]

index 5b72475a4b81341d88ab9e575009dd17785abd1a..250410756b1923f37dd19bb0f1e0140160130663 100644 (file)
@@ -14,7 +14,7 @@ PYTHON_VERSION:=$(PYTHON3_VERSION)
 PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
 
 PKG_NAME:=python3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
@@ -92,7 +92,7 @@ include ./files/python3-package-*.mk
 
 define Package/python3
 $(call Package/python3/Default)
-  DEPENDS:=+python3-light $(foreach package,$(PYTHON3_PACKAGES),+$(package))
+  DEPENDS:=+python3-light $(foreach package,$(filter-out python3-dev python3-lib2to3,$(PYTHON3_PACKAGES)),+$(package))
 endef
 
 define Package/python3/description
@@ -179,12 +179,10 @@ endef
 
 define Py3Package/python3-light/filespec
 +|/usr/lib/python$(PYTHON_VERSION)
--|/usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION)
 -|/usr/lib/python$(PYTHON_VERSION)/distutils/cygwinccompiler.py
 -|/usr/lib/python$(PYTHON_VERSION)/distutils/command/wininst*
 -|/usr/lib/python$(PYTHON_VERSION)/ensurepip
 -|/usr/lib/python$(PYTHON_VERSION)/idlelib
--|/usr/lib/python$(PYTHON_VERSION)/lib2to3
 -|/usr/lib/python$(PYTHON_VERSION)/tkinter
 -|/usr/lib/python$(PYTHON_VERSION)/turtledemo
 -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_test*.so
diff --git a/lang/python3/files/python3-package-dev.mk b/lang/python3/files/python3-package-dev.mk
new file mode 100644 (file)
index 0000000..37ee05f
--- /dev/null
@@ -0,0 +1,25 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-dev
+$(call Package/python3/Default)
+  TITLE:=Python $(PYTHON3_VERSION) development files
+  DEPENDS:=+python3
+endef
+
+define Py3Package/python3-dev/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON3_VERSION)-config $(1)/usr/bin
+       $(LN) python$(PYTHON3_VERSION)-config $(1)/usr/bin/python3-config
+       $(LN) python$(PYTHON_VERSION)/config-$(PYTHON_VERSION)/libpython$(PYTHON3_VERSION).a $(1)/usr/lib/libpython$(PYTHON3_VERSION).a
+endef
+
+$(eval $(call Py3BasePackage,python3-dev, \
+    /usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION) \
+    /usr/include/python$(PYTHON_VERSION) \
+    /usr/lib/pkgconfig \
+))
diff --git a/lang/python3/files/python3-package-lib2to3.mk b/lang/python3/files/python3-package-lib2to3.mk
new file mode 100644 (file)
index 0000000..4426a42
--- /dev/null
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2006-2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-lib2to3
+$(call Package/python3/Default)
+  TITLE:=Python $(PYTHON3_VERSION) lib2to3 module
+  DEPENDS:=+python3
+endef
+
+$(eval $(call Py3BasePackage,python3-lib2to3, \
+       /usr/lib/python$(PYTHON3_VERSION)/lib2to3 \
+))