summaryrefslogtreecommitdiff
path: root/dev-python/jq/jq-1.2.1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-09-16 22:05:01 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-09-16 22:05:01 +0100
commitcc4618c9ba3d974948ebf340b542d8cb01db2f55 (patch)
tree125ee67bb9e0d548771cf7b61d04bb1f0dc57687 /dev-python/jq/jq-1.2.1.ebuild
parent677b7ba5c317778df2ad7e70df94b9b7eec4adbc (diff)
gentoo resync : 16.09.2021
Diffstat (limited to 'dev-python/jq/jq-1.2.1.ebuild')
-rw-r--r--dev-python/jq/jq-1.2.1.ebuild38
1 files changed, 38 insertions, 0 deletions
diff --git a/dev-python/jq/jq-1.2.1.ebuild b/dev-python/jq/jq-1.2.1.ebuild
new file mode 100644
index 000000000000..f03da429c81e
--- /dev/null
+++ b/dev-python/jq/jq-1.2.1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit distutils-r1
+
+DESCRIPTION="Python bindings for jq"
+HOMEPAGE="https://github.com/mwilliamson/jq.py"
+SRC_URI="
+ https://github.com/mwilliamson/jq.py/archive/${PV}.tar.gz -> ${P}.gh.tar.gz
+ https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz
+ https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz"
+S="${WORKDIR}/jq.py-${PV}"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+BDEPEND="dev-python/cython[${PYTHON_USEDEP}]"
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ sed -e 's|import requests|#\0|' \
+ -e 's|urlretrieve(source_url, tarball_path)|shutil.copyfile(source_url, tarball_path)|' \
+ -e "s|source_url=.*kkos/oniguruma.*|source_url=\"${DISTDIR}/onig-6.9.4.tar.gz\",|" \
+ -e "s|source_url=.*stedolan/jq.*|source_url=\"${DISTDIR}/jq-1.6.tar.gz\",|" \
+ -i setup.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ # Cython compilation isn't part of setup.py, so do it manually
+ "${EPYTHON}" -m cython -3 jq.pyx -o jq.c || die
+ distutils-r1_python_compile
+}