Created attachment 225918 [details] port patch Add new port devel/py-jsonnet - python bindings for jsonnet
Please confirm this passes QA across multiple Python versions. Initial review: - strip command is hardcoded (38) - What is gmake used for and is it required? Upstream install directions specify only requiring pip install, which should not require make/gmake. If not, BINARY_ALIAS over REINPLACE - Upstream provides and utilises a test suite [1], please hook this up in a do-test target and add TEST_DEPENDS if required [] setup.py:test_suite="python._jsonnet_test",
(In reply to Kubilay Kocak from comment #1) Thanks for this fast reply! - Can you describe a bit more your thoughts about strip? - It build .so during installation https://github.com/google/jsonnet/blob/master/setup.py#L63 and uses Makefile in the same dir which is not compatible with freebsd make Didn't know about BINARY_ALIAS, thanks! - I'll take a look, thanks!
(In reply to timp87 from comment #2) The strip method in the patch has a hardcoded python version (38). It will fail for all other versions. It looks like they're using make to build libraries (not the binding)? [1] This port will need to depend on the libraries from the ports tree (if they exist) [1] https://github.com/google/jsonnet/blob/master/setup.py#L22
(In reply to Kubilay Kocak from comment #3) Thanks, initially I thought 38 is a line number in Makefile or something. I just missed thath. Yep, depending on jsonnet shared lib would be great, but they don't provide such knob. They build it everytime statically. I've submitted a improvement for devel/jsonnet which may help me to depend on it, but anyway python installation part should be modified to be linked to that lib dynamically. So gimme some time to investigate it.
(In reply to Pavel Timofeev from comment #4) Try removing the dependency sources in WRKSRC post-extract and adding USES=localbase which will setup CFLAGS/LDFLAGS to /usr/local/{include,lib}
Created attachment 225986 [details] port.diff It was a bit harder to make it dynamically link to libjsonnet.so Also I had to change MASTER_SITE to google repo on github as guys from CHEESESHOP repacked it w/o tests. Fix tests.
(In reply to Pavel Timofeev from comment #6) Nice work Pavel. Does this pass QA (poudriere) for default and a non default Python version?
(In reply to Kubilay Kocak from comment #7) Lemme run it and attach logs
Poudriere found small issue. Fixing it and rerunning
Created attachment 226002 [details] port.diff2
Created attachment 226003 [details] py38-jsonnet-0.17.0.log Running against py36, py37 and py39 also. Stay tuned ;)
Created attachment 226004 [details] py37-jsonnet-0.17.0.log
Created attachment 226005 [details] py36-jsonnet-0.17.0.log
Created attachment 226007 [details] py39-jsonnet-0.17.0.log
I've tested it against all available in ports tree python version. See attached poudriere logs. But I did it only on FreeBSD 13.0 amd64 as I don't have other machines.
Thanks Pavel. No need for logs in future, just confirmation on what combinations were run, and their final PASS/FAIL Can you detail what LDFLAGS -s is for? Ideally comment that block too (if it remains necessary)
(In reply to Kubilay Kocak from comment #16) This flag tells the linked to strip shared lib which is part of this port
(In reply to Pavel Timofeev from comment #17) Ah ok, yep, definitely use post-install: STRIP_CMD <path/to/file> for this, as it has support for WITH_DEBUG at the framework level
Created attachment 226024 [details] port.diff3 Ok, the only change here is use STRIP_CMD instead of LDFLAGS -s
Created attachment 226025 [details] port.diff4 Use PYTHON_EXT_SUFFIX fir that
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f091166687409804b91a1a041fb715d24f25c028 commit f091166687409804b91a1a041fb715d24f25c028 Author: Pavel Timofeev <timp87@gmail.com> AuthorDate: 2021-06-26 06:22:32 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2021-06-26 06:32:53 +0000 devel/py-jsonnet: Python bindings for Jsonnet Jsonnet lets you compute fragments of JSON within the structure, bringing the same benefit to structured data that templating languages bring to plain text. WWW: https://github.com/google/jsonnet PR: 256705 Reviewed by: koobs Approved by: new maintainer devel/Makefile | 1 + devel/py-jsonnet/Makefile (new) | 31 +++++++++++++ devel/py-jsonnet/distinfo (new) | 3 ++ ...ch-case__studies_kubernetes_test__same.py (new) | 35 +++++++++++++++ devel/py-jsonnet/files/patch-setup.py (new) | 52 ++++++++++++++++++++++ devel/py-jsonnet/pkg-descr (new) | 6 +++ 6 files changed, 128 insertions(+)
Thanks for your contribution!
Re-open to update MAINTAINER line to match Reporter email (and other port) maintainer lines
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=65fbda12aea9ace689972d9c7e726ceb706c876f commit 65fbda12aea9ace689972d9c7e726ceb706c876f Author: Kevin Bowling <kbowling@FreeBSD.org> AuthorDate: 2021-06-27 04:31:45 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2021-06-27 04:31:45 +0000 devel/py-jsonnet: Correct maintainer mail PR: 256705 Reported by: jbeich Reviewed by: koobs devel/py-jsonnet/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)