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.

75 lines
1.8 KiB

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