summaryrefslogtreecommitdiff
path: root/lang/python
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2023-11-10 14:04:55 +0800
committerTianling Shen <cnsztl@gmail.com>2023-11-16 02:30:21 +0800
commitb354a7edbe35bf3cbaafb85edf74181ab7810202 (patch)
tree9959a8b6f03479a01933e79e2ce88e2c97fde790 /lang/python
parent6ff496d113a69a1a6a55cb0ac0ae46241007dddc (diff)
python-argcomplete: Add new package
From the README: Argcomplete provides easy, extensible command line tab completion of arguments for your Python application. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'lang/python')
-rw-r--r--lang/python/python-argcomplete/Makefile43
-rw-r--r--lang/python/python-argcomplete/patches/001-unpin-setuptools.patch9
-rw-r--r--lang/python/python-argcomplete/test.sh5
3 files changed, 57 insertions, 0 deletions
diff --git a/lang/python/python-argcomplete/Makefile b/lang/python/python-argcomplete/Makefile
new file mode 100644
index 000000000..d977f01a2
--- /dev/null
+++ b/lang/python/python-argcomplete/Makefile
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-argcomplete
+PKG_VERSION:=3.1.4
+PKG_RELEASE:=1
+
+PYPI_NAME:=argcomplete
+PKG_HASH:=72558ba729e4c468572609817226fb0a6e7e9a0a7d477b882be168c0b4a62b94
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE.rst
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-argcomplete
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Bash tab completion for argparse
+ URL:=https://github.com/kislyuk/argcomplete
+ DEPENDS:=+python3-light
+endef
+
+define Package/python3-argcomplete/description
+Argcomplete provides easy, extensible command line tab completion of
+arguments for your Python application.
+endef
+
+$(eval $(call Py3Package,python3-argcomplete))
+$(eval $(call BuildPackage,python3-argcomplete))
+$(eval $(call BuildPackage,python3-argcomplete-src))
diff --git a/lang/python/python-argcomplete/patches/001-unpin-setuptools.patch b/lang/python/python-argcomplete/patches/001-unpin-setuptools.patch
new file mode 100644
index 000000000..a85ce857a
--- /dev/null
+++ b/lang/python/python-argcomplete/patches/001-unpin-setuptools.patch
@@ -0,0 +1,9 @@
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = ["setuptools>=67.7.2", "setuptools_scm[toml]>=6.2"]
++requires = ["setuptools", "setuptools_scm[toml]>=6.2"]
+ build-backend = "setuptools.build_meta"
+
+ [project]
diff --git a/lang/python/python-argcomplete/test.sh b/lang/python/python-argcomplete/test.sh
new file mode 100644
index 000000000..0ecba3e5b
--- /dev/null
+++ b/lang/python/python-argcomplete/test.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+[ "$1" = python3-argcomplete ] || exit 0
+
+python3 -c 'import argcomplete'