Created attachment 234347 [details] A new port for py-jschema_to_python Add a new port, py-jschema_to_python is to generate Python classes from a JSON schema.
Created attachment 234560 [details] complete diff - new port for py-jschema_to_python full path and devel/Makefile category
Hello, It fails to configure. Please take a look at poudriere logs: https://people.freebsd.org/~eduardo/logs/py38-jschema_to_python-1.2.3/ Cheers
(In reply to Nuno Teixeira from comment #2) The error message describe the problem. > error in setup command: Error parsing /wrkdirs/usr/ports/devel/py-jschema_to_python/work-py38/jschema-to-python-1.2.3/setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name jschema_to_python was given, but was not able to be found. The problem is caused by using a tarball from GitHub. The build should use either the sdist (from PyPI) or a complete git clone. BTW, this should be devel/py-jschema-to-python to match PyPI naming. I can build this port successfully using the sdist from PyPI.
(In reply to Po-Chuan Hsieh from comment #3) Hello Po-Chuan! There is no magic MASTER_SITES macro for PyPI so we need to find a way to get tarball. What I found is that tarball is located at: https://pypi.org/project/jschema-to-python/#files and link is https://files.pythonhosted.org/packages/1d/7f/5ae3d97ddd86ec33323231d68453afd504041efcfd4f4dde993196606849/jschema_to_python-1.2.3.tar.gz any hint to include this link into port Makefile? Cheers
(In reply to Po-Chuan Hsieh from comment #3) Nevermind, CHEESESHOP :)
Created attachment 234581 [details] jschema-to-python v2 - change pkg name to "jschema-to-python" to match PyPI name (sugested by @sunpoet) - use CHEESESHOP magic macro MASTERSITES - readjust files/patch - use USES:..dos2unix since src files are in dos format TODO: - need better handling of disfile name if possible: DISTNAME=jschema_to_python-${DISTVERSION} BUILD: OK BUILD LOG: https://people.freebsd.org/~eduardo/logs/py38-jschema-to-python-1.2.3/
(In reply to Po-Chuan Hsieh from comment #3) Could you take a look at diff version 2? it compliles fine. Thanks
(In reply to Nuno Teixeira from comment #7) LGTM. Besides, regarding of WWW, I'd like to use https://github.com/microsoft/jschema-to-python instead of the PyPI link.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=cdc4f394015b90c1aa11d7a9dc725e4ce0414616 commit cdc4f394015b90c1aa11d7a9dc725e4ce0414616 Author: Norikatsu Shigemura <nork@ninth-nine.com> AuthorDate: 2022-06-09 22:13:51 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2022-06-09 22:13:51 +0000 devel/py-jschema-to-python: New Port: Generate Python classes from a JSON schema Add a new port, py-jschema-to-python is to generate Python classes from a JSON schema. - Author becomes maintainer PR: 264362 devel/Makefile | 1 + devel/py-jschema-to-python/Makefile (new) | 24 ++++++++++++++++++++++ devel/py-jschema-to-python/distinfo (new) | 3 +++ .../files/patch-setup.cfg (new) | 16 +++++++++++++++ devel/py-jschema-to-python/pkg-descr (new) | 3 +++ 5 files changed, 47 insertions(+)
Committed, thank you!
That's cool, thank you! I'll feed back your suggestions, when I'll make a new port.