Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
textproc/py-jq: NEW: lightweight and flexible JSON processor
- Loading branch information
Showing
4 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TIMESTAMP = 1621674990 | ||
SHA256 (jq-1.1.3.tar.gz) = f9ec1dfa7f9875b04495f3e08e85ee96f37a3b843e5bca738a3300732865dde7 | ||
SIZE (jq-1.1.3.tar.gz) = 71393 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |