Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #
  2. # Copyright (C) 2014-2016 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-setuptools
  9. PKG_VERSION:=27.2.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=setuptools-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://pypi.python.org/packages/87/ba/54197971d107bc06f5f3fbdc0d728a7ae0b10cafca46acfddba65a0899d8/
  13. PKG_MD5SUM:=b39715612fdc0372dbfd7b3fcf5d4fe5
  14. HOST_BUILD_DEPENDS:=python python/host
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  17. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
  18. HOST_UNPACK=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  19. include $(INCLUDE_DIR)/host-build.mk
  20. include $(INCLUDE_DIR)/package.mk
  21. $(call include_mk, python-package.mk)
  22. $(call include_mk, python-host.mk)
  23. define Package/python-setuptools
  24. SUBMENU:=Python
  25. SECTION:=lang
  26. CATEGORY:=Languages
  27. TITLE:=Tool for installing Python packages.
  28. URL:=https://bitbucket.org/pypa/setuptools
  29. DEPENDS:=+python +ca-certificates
  30. MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
  31. endef
  32. define Package/python-setuptools/description
  33. Easily download, build, install, upgrade, and uninstall Python packages
  34. endef
  35. define Build/Compile
  36. $(call Build/Compile/PyMod,,\
  37. install --root="$(PKG_INSTALL_DIR)" --prefix="/usr" \
  38. --single-version-externally-managed \
  39. )
  40. endef
  41. define Build/InstallDev
  42. $(INSTALL_DIR) $(PYTHON_LIB_DIR)
  43. $(CP) \
  44. $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
  45. $(PYTHON_LIB_DIR)
  46. endef
  47. define PyPackage/python-setuptools/install
  48. $(INSTALL_DIR) $(1)/usr/bin
  49. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  50. endef
  51. define Host/Compile
  52. $(call Build/Compile/HostPyMod,,\
  53. install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \
  54. --single-version-externally-managed \
  55. )
  56. endef
  57. define Host/Install
  58. endef
  59. $(eval $(call HostBuild))
  60. $(eval $(call PyPackage,python-setuptools))
  61. $(eval $(call BuildPackage,python-setuptools))