aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorJosef Schlehofer <pepe.schlehofer@gmail.com>2019-03-26 22:23:43 +0100
committerJosef Schlehofer <pepe.schlehofer@gmail.com>2019-03-28 14:34:39 +0100
commit5f24ab841b67acaac4f7e698bc02aa646a157e76 (patch)
tree37e4ad933bb9174873ba95503b5f98e7fc75d522 /lang
parent80f2556eb23b9e61c4eb34df134c0cf0b970c97a (diff)
python-voluptuous: add a new package
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Diffstat (limited to 'lang')
-rw-r--r--lang/python/python-voluptuous/Makefile69
1 files changed, 69 insertions, 0 deletions
diff --git a/lang/python/python-voluptuous/Makefile b/lang/python/python-voluptuous/Makefile
new file mode 100644
index 000000000..c5ccca145
--- /dev/null
+++ b/lang/python/python-voluptuous/Makefile
@@ -0,0 +1,69 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-voluptuous
+PKG_VERSION:=0.11.5
+PKG_RELEASE:=1
+
+PKG_SOURCE:=voluptuous-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/v/voluptuous/
+PKG_HASH:=567a56286ef82a9d7ae0628c5842f65f516abcb496e74f3f59f1d7b28df314ef
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-voluptuous-$(PKG_VERSION)
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+
+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-voluptuous/Default
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Data validation library
+ URL:=https://github.com/alecthomas/voluptuous
+endef
+
+define Package/python-voluptuous
+$(call Package/python-voluptuous/Default)
+ DEPENDS:= \
+ +PACKAGE_python-voluptuous:python-light
+ VARIANT:=python
+endef
+
+define Package/python3-voluptuous
+$(call Package/python-voluptuous/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-voluptuous:python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-voluptuous/description
+It is primarily intended for validating data coming into Python as JSON, YAML, etc.
+endef
+
+define Package/python3-voluptuous/description
+$(call Package/python-voluptuous/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-voluptuous))
+$(eval $(call BuildPackage,python-voluptuous))
+$(eval $(call BuildPackage,python-voluptuous-src))
+
+$(eval $(call Py3Package,python3-voluptuous))
+$(eval $(call BuildPackage,python3-voluptuous))
+$(eval $(call BuildPackage,python3-voluptuous-src))
+