You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.0 KiB

  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=python-pip
  9. PKG_VERSION:=8.1.2
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=pip-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://pypi.python.org/packages/e7/a8/7556133689add8d1a54c0b14aeff0acb03c64707ce100ecd53934da1aa13/
  13. PKG_MD5SUM:=87083c0b9867963b29f7aba3613e8f4a
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/python-pip-$(PKG_VERSION)
  15. PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  16. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/python-pip-$(PKG_VERSION)
  17. HOST_UNPACK=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  18. PKG_USE_MIPS16:=0
  19. HOST_BUILD_DEPENDS:=python python/host python-setuptools/host
  20. include $(INCLUDE_DIR)/host-build.mk
  21. include $(INCLUDE_DIR)/package.mk
  22. $(call include_mk, python-package.mk)
  23. $(call include_mk, python-host.mk)
  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 +ca-certificates
  31. MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
  32. endef
  33. define Package/python-pip/description
  34. A tool for installing and managing Python packages.
  35. endef
  36. define Build/Compile
  37. $(call Build/Compile/PyMod,,\
  38. install --root="$(PKG_INSTALL_DIR)" --prefix="/usr" \
  39. --single-version-externally-managed \
  40. )
  41. endef
  42. define PyPackage/python-pip/filespec
  43. +|$(PYTHON_PKG_DIR)
  44. -|$(PYTHON_PKG_DIR)/pip/_vendor/distlib/*.exe
  45. endef
  46. define PyPackage/python-pip/install
  47. $(INSTALL_DIR) $(1)/usr/bin $(1)/etc
  48. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
  49. $(INSTALL_CONF) ./files/pip.conf $(1)/etc/
  50. endef
  51. define Host/Compile
  52. $(call Build/Compile/HostPyMod,,\
  53. install --root="$(STAGING_DIR)/host" --prefix="" \
  54. --single-version-externally-managed \
  55. )
  56. endef
  57. define Host/Install
  58. endef
  59. $(eval $(call HostBuild))
  60. $(eval $(call PyPackage,python-pip))
  61. $(eval $(call BuildPackage,python-pip))