2 # Copyright (C) 2014-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
10 PKG_NAME:=python-setuptools
14 PKG_SOURCE:=setuptools-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://pypi.python.org/packages/87/ba/54197971d107bc06f5f3fbdc0d728a7ae0b10cafca46acfddba65a0899d8/
16 PKG_MD5SUM:=b39715612fdc0372dbfd7b3fcf5d4fe5
18 HOST_BUILD_DEPENDS:=python python/host
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
23 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
24 HOST_UNPACK=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
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)
31 define Package/python-setuptools
35 TITLE:=Tool for installing Python packages.
36 URL:=https://bitbucket.org/pypa/setuptools
37 DEPENDS:=+python +ca-certificates
38 MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
41 define Package/python-setuptools/description
42 Easily download, build, install, upgrade, and uninstall Python packages
46 $(call Build/Compile/PyMod,,\
47 install --root="$(PKG_INSTALL_DIR)" --prefix="/usr" \
48 --single-version-externally-managed \
52 define Build/InstallDev
53 $(INSTALL_DIR) $(PYTHON_LIB_DIR)
55 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
59 define PyPackage/python-setuptools/install
60 $(INSTALL_DIR) $(1)/usr/bin
61 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
65 $(call Build/Compile/HostPyMod,,\
66 install --root="$(STAGING_DIR_HOSTPKG)" --prefix="" \
67 --single-version-externally-managed \
74 $(eval $(call HostBuild))
76 $(eval $(call PyPackage,python-setuptools))
77 $(eval $(call BuildPackage,python-setuptools))