From c394db70b09419c8aaab1b0a493e5d884984c4b1 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Tue, 16 Jan 2018 01:35:35 +0800 Subject: [PATCH] python-incremental: new package This is a new requirement for the Twisted package. From the readme: Incremental is a small library that versions your Python projects. Signed-off-by: Jeffery To --- lang/python/python-incremental/Makefile | 67 +++++++++++++++++++ .../patches/001-omit-tests.patch | 11 +++ 2 files changed, 78 insertions(+) create mode 100644 lang/python/python-incremental/Makefile create mode 100644 lang/python/python-incremental/patches/001-omit-tests.patch diff --git a/lang/python/python-incremental/Makefile b/lang/python/python-incremental/Makefile new file mode 100644 index 0000000000..107cfaf3f5 --- /dev/null +++ b/lang/python/python-incremental/Makefile @@ -0,0 +1,67 @@ +# +# Copyright (C) 2018 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=python-incremental +PKG_VERSION:=17.5.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=incremental-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/i/incremental +PKG_HASH:=7b751696aaf36eebfab537e458929e194460051ccad279c72b755a167eebd4b3 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-incremental-$(PKG_VERSION) + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Jeffery To + +include $(INCLUDE_DIR)/package.mk +include ../python-package.mk +include ../python3-package.mk + +PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) + +define Package/python-incremental/Default + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + URL:=https://github.com/twisted/incremental +endef + +define Package/python-incremental +$(call Package/python-incremental/Default) + TITLE:=Versions your Python projects + DEPENDS:=+PACKAGE_python-incremental:python-light + VARIANT:=python +endef + +define Package/python3-incremental +$(call Package/python-incremental/Default) + TITLE:=Versions your Python projects + DEPENDS:=+PACKAGE_python3-incremental:python3-light + VARIANT:=python3 +endef + +define Package/python-incremental/description +Incremental is a small library that versions your Python projects. +endef + +define Package/python3-incremental/description +$(call Package/python-incremental/description) +. +(Variant for Python3) +endef + +$(eval $(call PyPackage,python-incremental)) +$(eval $(call BuildPackage,python-incremental)) +$(eval $(call BuildPackage,python-incremental-src)) + +$(eval $(call Py3Package,python3-incremental)) +$(eval $(call BuildPackage,python3-incremental)) +$(eval $(call BuildPackage,python3-incremental-src)) diff --git a/lang/python/python-incremental/patches/001-omit-tests.patch b/lang/python/python-incremental/patches/001-omit-tests.patch new file mode 100644 index 0000000000..b2c04969c3 --- /dev/null +++ b/lang/python/python-incremental/patches/001-omit-tests.patch @@ -0,0 +1,11 @@ +--- a/setup.py ++++ b/setup.py +@@ -32,7 +32,7 @@ setup( + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + ], +- packages=find_packages("src", exclude=("exampleproj",)), ++ packages=find_packages("src", exclude=("exampleproj", "*.tests", "*.tests.*")), + package_dir={"": "src"}, + extras_require={ + "scripts": [ -- 2.30.2