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.

62 lines
1.5 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-setuptools
  9. PKG_VERSION:=7.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=setuptools-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://pypi.python.org/packages/source/s/setuptools/
  13. PKG_MD5SUM:=6245d6752e2ef803c365f560f7f2f940
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/setuptools-$(PKG_VERSION)
  15. include $(INCLUDE_DIR)/package.mk
  16. $(call include_mk, python-package.mk)
  17. define Package/python-setuptools
  18. SUBMENU:=Python
  19. SECTION:=lang
  20. CATEGORY:=Languages
  21. TITLE:=Tool for installing Python packages.
  22. URL:=https://bitbucket.org/pypa/setuptools
  23. DEPENDS:=+python
  24. endef
  25. define Package/python-setuptools/description
  26. Easily download, build, install, upgrade, and uninstall Python packages
  27. endef
  28. PYTHONPATH:=$(PKG_INSTALL_DIR)/$(PYTHON_PKG_DIR)
  29. define Build/Compile
  30. $(INSTALL_DIR) $(PYTHONPATH)
  31. $(call Build/Compile/PyMod,,\
  32. install --prefix="$(PKG_INSTALL_DIR)/usr" \
  33. )
  34. endef
  35. define PyPackage/python-setuptools/filespec
  36. +|/usr/lib/python$(PYTHON_VERSION)/site-packages
  37. endef
  38. define Build/InstallDev
  39. $(INSTALL_DIR) $(2)/lib/python$(PYTHON_VERSION)/site-packages
  40. $(CP) \
  41. $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/site-packages/* \
  42. $(HOST_PYTHON_LIB_DIR)/site-packages
  43. endef
  44. define PyPackage/python-setuptools/install
  45. $(INSTALL_DIR) $(1)/usr/bin
  46. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  47. endef
  48. $(eval $(call PyPackage,python-setuptools))
  49. $(eval $(call BuildPackage,python-setuptools))