Created attachment 234447 [details] devel/py-jsonschema: include schemas in build devel/py-jsonschema's build processes was moved to hatch with 4.6.0. Our port currently tries to rely on a setup.py stub, but this yields an incomplete package. Most notably, the JSON schema files are missing from the package, which basically breaks the port. This diff includes a setup.py generated via a hatch sdist build and adds the schema files to the MANIFEST.in file to include them in the resulting package. This was initially reported to me by Stefan Hämmerl <stefan.haemmerl@gmx.de>, who noticed the resulting breakage on his synapse server. :)
Addendum for future reference, perhaps: The method I used for obtaining the setup.py file is to add [tool.hatch.build.targets.sdist] support-legacy = true to pyproject.toml. Afterwards, building an sdist with `python3 -m build -s` yields a corresponding archive in dist/jsonschema-4.6.0.tar.gz, from which the setup.py file can be extracted. The latter build still doesn't contain the subdirectory in MANIFEST.in though, so it didn't fix the issue entirely. I'm not entirely convinced if adding the graft entry to MANIFEST.in is the best way to resolve this issue, but it was the only one I could come up with. :-/
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=924f4e5dfca078753a3b12db278625b7d5377857 commit 924f4e5dfca078753a3b12db278625b7d5377857 Author: Sascha Biberhofer <ports@skyforge.at> AuthorDate: 2022-06-05 16:27:04 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2022-06-05 16:34:00 +0000 devel/py-jsonschema: Include schemas After the latest upgrade to 4.6.0 the pkg was missing the schemas file as the new hatch build system which doesn't create the full files as our building procedure requires dependency on a stub setup.py file. For future reference: The method I used for obtaining the setup.py file is to add [tool.hatch.build.targets.sdist] support-legacy = true to pyproject.toml. Afterwards, building an sdist with `python3 -m build -s` yields a corresponding archive in dist/jsonschema-4.6.0.tar.gz, from which the setup.py file can be extracted. The latter build still doesn't contain the subdirectory in MANIFEST.in though, so it didn't fix the issue entirely. While there are lots of dependent ports for now I am committing this but will look into a better solution to adapt the situation. PR: 264452 Reported by: stefan.haemmerl@gmx.de devel/py-jsonschema/Makefile | 1 + devel/py-jsonschema/files/patch-MANIFEST.in (new) | 7 +++ devel/py-jsonschema/files/patch-setup.py | 76 ++++++++++++++++++++--- 3 files changed, 74 insertions(+), 10 deletions(-)
Committed with changes.