Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 May 2021 11:04:18 GMT
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: ef0c7ddce0b1 - main - textproc/py-jq: NEW: lightweight and flexible JSON processor
Message-ID:  <202105221104.14MB4Ifm019120@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ef0c7ddce0b18552743aaba4f13167826182a349

commit ef0c7ddce0b18552743aaba4f13167826182a349
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2021-05-22 10:18:21 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2021-05-22 11:04:07 +0000

    textproc/py-jq: NEW: lightweight and flexible JSON processor
---
 textproc/py-jq/Makefile             | 25 +++++++++++++++++++++++++
 textproc/py-jq/distinfo             |  3 +++
 textproc/py-jq/files/patch-setup.py | 24 ++++++++++++++++++++++++
 textproc/py-jq/pkg-descr            |  5 +++++
 4 files changed, 57 insertions(+)

diff --git a/textproc/py-jq/Makefile b/textproc/py-jq/Makefile
new file mode 100644
index 000000000000..45372fc5db5f
--- /dev/null
+++ b/textproc/py-jq/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	jq
+PORTVERSION=	1.1.3
+CATEGORIES=	textproc python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	mandree@FreeBSD.org
+COMMENT=	jq.py: a lightweight and flexible JSON processor
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libjq.so:textproc/jq \
+		libonig.so:devel/oniguruma
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR}
+BUILD_DEPENDS=	${RUN_DEPENDS}
+
+USES=		localbase python:3.4+
+USE_PYTHON=	autoplist distutils
+
+post-install:
+		${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/jq.*.so
+
+.include <bsd.port.mk>
diff --git a/textproc/py-jq/distinfo b/textproc/py-jq/distinfo
new file mode 100644
index 000000000000..a6397f5fe49e
--- /dev/null
+++ b/textproc/py-jq/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1621674990
+SHA256 (jq-1.1.3.tar.gz) = f9ec1dfa7f9875b04495f3e08e85ee96f37a3b843e5bca738a3300732865dde7
+SIZE (jq-1.1.3.tar.gz) = 71393
diff --git a/textproc/py-jq/files/patch-setup.py b/textproc/py-jq/files/patch-setup.py
new file mode 100644
index 000000000000..a2237eb148a5
--- /dev/null
+++ b/textproc/py-jq/files/patch-setup.py
@@ -0,0 +1,24 @@
+--- setup.py.orig	2021-05-03 13:00:29 UTC
++++ setup.py
+@@ -43,8 +43,6 @@ class jq_build_ext(build_ext):
+     def run(self):
+         if not os.path.exists(dependency_path(".")):
+             os.makedirs(dependency_path("."))
+-        self._build_oniguruma()
+-        self._build_libjq()
+         build_ext.run(self)
+ 
+     def _build_oniguruma(self):
+@@ -103,11 +101,7 @@ jq_extension = Extension(
+     "jq",
+     sources=["jq.c"],
+     include_dirs=[os.path.join(jq_lib_dir, "src")],
+-    extra_link_args=["-lm"],
+-    extra_objects=[
+-        os.path.join(jq_lib_dir, ".libs/libjq.a"),
+-        os.path.join(oniguruma_lib_install_dir, "lib/libonig.a"),
+-    ],
++    extra_link_args=["-lm", "-ljq", "-lonig"],
+ )
+ 
+ setup(
diff --git a/textproc/py-jq/pkg-descr b/textproc/py-jq/pkg-descr
new file mode 100644
index 000000000000..13ad46f3dcdd
--- /dev/null
+++ b/textproc/py-jq/pkg-descr
@@ -0,0 +1,5 @@
+jq.py: a lightweight and flexible JSON processor
+
+py-jq contains Python bindings for jq.
+
+WWW: https://github.com/mwilliamson/jq.py



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105221104.14MB4Ifm019120>