Browse Source

python-pip: first revision

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Alexandru Ardelean 10 years ago
parent
commit
286e50a0bd
1 changed files with 56 additions and 0 deletions
  1. 56
    0
      lang/python-pip/Makefile

+ 56
- 0
lang/python-pip/Makefile View File

@@ -0,0 +1,56 @@
1
+#
2
+# Copyright (C) 2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+# 
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=python-pip
11
+PKG_VERSION:=1.5.6
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=pip-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pip/
16
+PKG_MD5SUM:=01026f87978932060cc86c1dc527903e
17
+
18
+PKG_BUILD_DIR:=$(BUILD_DIR)/pip-$(PKG_VERSION)
19
+PKG_USE_MIPS16:=0
20
+
21
+include $(INCLUDE_DIR)/package.mk
22
+$(call include_mk, python-package.mk)
23
+
24
+define Package/python-pip
25
+  SUBMENU:=Python
26
+  SECTION:=lang
27
+  CATEGORY:=Languages
28
+  TITLE:=Tool for installing Python packages.
29
+  URL:=https://pip.pypa.io
30
+  DEPENDS:=+python +python-setuptools
31
+endef
32
+
33
+define Package/python-pip/description
34
+  A tool for installing and managing Python packages.
35
+endef
36
+
37
+PYTHONPATH:=$(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)
38
+define Build/Compile
39
+	$(INSTALL_DIR) $(PYTHONPATH)
40
+	$(call Build/Compile/PyMod,,\
41
+		install --prefix="$(PKG_INSTALL_DIR)/usr" \
42
+	)
43
+endef
44
+
45
+define PyPackage/python-pip/filespec
46
++|/usr/lib/python$(PYTHON_VERSION)
47
+endef
48
+
49
+define PyPackage/python-pip/install
50
+	$(INSTALL_DIR) $(1)/usr/bin
51
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
52
+endef
53
+
54
+$(eval $(call PyPackage,python-pip))
55
+$(eval $(call BuildPackage,python-pip))
56
+