treewide: replace $(STAGING_DIR)/host and $(HOST_BUILD_PREFIX) with $(STAGING_DIR_HOS...
[feed/packages.git] / lang / python-pip / Makefile
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:=8.1.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=pip-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://pypi.python.org/packages/e7/a8/7556133689add8d1a54c0b14aeff0acb03c64707ce100ecd53934da1aa13/
16 PKG_MD5SUM:=87083c0b9867963b29f7aba3613e8f4a
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/python-pip-$(PKG_VERSION)
19 PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
20 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/python-pip-$(PKG_VERSION)
21 HOST_UNPACK=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
22 PKG_USE_MIPS16:=0
23
24 HOST_BUILD_DEPENDS:=python python/host python-setuptools/host
25
26 include $(INCLUDE_DIR)/host-build.mk
27 include $(INCLUDE_DIR)/package.mk
28 $(call include_mk, python-package.mk)
29 $(call include_mk, python-host.mk)
30
31 define Package/python-pip
32 SUBMENU:=Python
33 SECTION:=lang
34 CATEGORY:=Languages
35 TITLE:=Tool for installing Python packages.
36 URL:=https://pip.pypa.io
37 DEPENDS:=+python +python-setuptools +ca-certificates
38 MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
39 endef
40
41 define Package/python-pip/description
42 A tool for installing and managing Python packages.
43 endef
44
45 define Build/Compile
46 $(call Build/Compile/PyMod,,\
47 install --root="$(PKG_INSTALL_DIR)" --prefix="/usr" \
48 --single-version-externally-managed \
49 )
50 endef
51
52 define PyPackage/python-pip/filespec
53 +|$(PYTHON_PKG_DIR)
54 -|$(PYTHON_PKG_DIR)/pip/_vendor/distlib/*.exe
55 endef
56
57 define PyPackage/python-pip/install
58 $(INSTALL_DIR) $(1)/usr/bin $(1)/etc
59 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
60 $(INSTALL_CONF) ./files/pip.conf $(1)/etc/
61 endef
62
63 define Host/Compile
64 $(call Build/Compile/HostPyMod,,\
65 install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \
66 --single-version-externally-managed \
67 )
68 endef
69
70 define Host/Install
71 endef
72
73 $(eval $(call HostBuild))
74
75 $(eval $(call PyPackage,python-pip))
76 $(eval $(call BuildPackage,python-pip))