[Bug 259567] devel/py-jsonschema: Version returns 0.0.0, breaking net-im/py-matrix-synapse which runs a version check

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 02 Nov 2021 11:51:20 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259567

--- Comment #3 from Sascha Biberhofer <ports@skyforge.at> ---
I can confirm this on my system. Seems like something is weirdly wrong with the
version of the FreeBSD package and *only* the distributed package:

* It appears as jsonschema==0.0.0 in pip freeze too, suggesting that something
is wrong with the package metadata per se.
* I quickly built and installed the package directly from ports, which does
*not* result in such a broken package for me (i.e. both pip freeze and
jsonschema --version report the correct version number). Similarly, installing
the package directly via pip works fine too.
* Building the package in poudriere however yields a package with version 0.0.0
in pip which is consequently also reported back by the package

It would appear that something goes wrong when building the package with
poudriere, but I'm currently not sure what exactly goes wrong here and I'm a
bit uncertain how to proceed. The way the package obtains the version appears
to have changed and relies on importlib's metadata.version() function, which
*should* work, I suppose, but I'm not sure how that version is formed before
the package is installed and would need to dig deeper into this to properly
find the cause.


In the meantime, should we patch synapse to remove the version check? It would
be a hack and I'd prefer to resolve this issue right here, but it *should* be
fine for the time being to ensure things keep running moderately smoothly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.