setuptools-git and ZHA packages #2219

Closed
opened 2023-10-28 00:27:27 +02:00 by Ghost · 2 comments

Hi,

Thanks for all your work on these ebuilds.

I've noticed an issue with the ZHA ebuilds: bellows universal-silabs-flasher zha-quirks zigpy-znp zigpy and zigpy-deconz...

All these packages seem to have started using setuptools-git to extract the version numbers from the git info, however the tarballs from PyPi don't contain the git files so the packages all get installed as version "0.0.0". As a result homeassistant can't load them and tries to download them.

I'm not sure what the best fix is... perhaps a sed patch to pyproject.toml?

Thanks,
Tim

Hi, Thanks for all your work on these ebuilds. I've noticed an issue with the ZHA ebuilds: bellows universal-silabs-flasher zha-quirks zigpy-znp zigpy and zigpy-deconz... All these packages seem to have started using setuptools-git to extract the version numbers from the git info, however the tarballs from PyPi don't contain the git files so the packages all get installed as version "0.0.0". As a result homeassistant can't load them and tries to download them. I'm not sure what the best fix is... perhaps a sed patch to pyproject.toml? Thanks, Tim
onkelbeh added a new dependency 2023-10-28 09:38:26 +02:00
onkelbeh added a new dependency 2023-10-28 09:38:49 +02:00
onkelbeh added a new dependency 2023-10-28 09:38:56 +02:00
onkelbeh added a new dependency 2023-10-28 09:39:05 +02:00
onkelbeh added a new dependency 2023-10-28 09:39:11 +02:00
onkelbeh added a new dependency 2023-10-28 09:39:29 +02:00
Owner

Although I do not seen a reason for it, this new build backend seems to get popular, due to missing support for the dynamic_versioning.backend in portage, I did it like this:

src_prepare() {
	# remove unsupported dynamic-versioning plugin
	sed 's/0.0.0/${PV}/g' -i pyproject.toml || die
	sed 's/, "poetry-dynamic-versioning"//g' -i pyproject.toml || die
	sed 's/poetry_dynamic_versioning.backend/poetry.core.masonry.api/g' -i pyproject.toml || die
	eapply_user
}

already used in:

aiomqtt/aiomqtt-1.2.1.ebuild d30604edfa
melnor-bluetooth/melnor-bluetooth-0.0.25.ebuild ca37476af2

As I checked now, I have missed some of them:

root@g18-hasstest:/usr/portage/homeassistant/dev-python # ls -la /usr/lib/python3.11/site-packages/ | grep "0.0.0"
drwxr-xr-x    2 root root     4096 Oct 22 16:12 bellows-0.0.0.dist-info
drwxr-xr-x    2 root root     4096 Oct 22 14:50 universal_silabs_flasher-0.0.0.dist-info
drwxr-xr-x    2 root root     4096 Oct 23 19:43 zha_quirks-0.0.0.dist-info
drwxr-xr-x    2 root root     4096 Oct 22 14:10 zigpy-0.0.0.dist-info
drwxr-xr-x    2 root root     4096 Oct 22 14:50 zigpy_deconz-0.0.0.dist-info
drwxr-xr-x    2 root root     4096 Oct 22 16:15 zigpy_znp-0.0.0.dist-info

If you find more, please let me know, especially if they already made it in the repo.

Although I do not seen a reason for it, this new build backend seems to get popular, due to missing support for the `dynamic_versioning.backend` in `portage`, I did it like this: ```bash src_prepare() { # remove unsupported dynamic-versioning plugin sed 's/0.0.0/${PV}/g' -i pyproject.toml || die sed 's/, "poetry-dynamic-versioning"//g' -i pyproject.toml || die sed 's/poetry_dynamic_versioning.backend/poetry.core.masonry.api/g' -i pyproject.toml || die eapply_user } ``` already used in: aiomqtt/aiomqtt-1.2.1.ebuild https://git.edevau.net/onkelbeh/HomeAssistantRepository/commit/d30604edfab2395f44d6a319d4209871db350355 melnor-bluetooth/melnor-bluetooth-0.0.25.ebuild https://git.edevau.net/onkelbeh/HomeAssistantRepository/commit/ca37476af22f59b4547c654ff3213d4970846d8e As I checked now, I have missed some of them: ```bash root@g18-hasstest:/usr/portage/homeassistant/dev-python # ls -la /usr/lib/python3.11/site-packages/ | grep "0.0.0" drwxr-xr-x 2 root root 4096 Oct 22 16:12 bellows-0.0.0.dist-info drwxr-xr-x 2 root root 4096 Oct 22 14:50 universal_silabs_flasher-0.0.0.dist-info drwxr-xr-x 2 root root 4096 Oct 23 19:43 zha_quirks-0.0.0.dist-info drwxr-xr-x 2 root root 4096 Oct 22 14:10 zigpy-0.0.0.dist-info drwxr-xr-x 2 root root 4096 Oct 22 14:50 zigpy_deconz-0.0.0.dist-info drwxr-xr-x 2 root root 4096 Oct 22 16:15 zigpy_znp-0.0.0.dist-info ``` If you find more, please let me know, especially if they already made it in the repo.
onkelbeh added the
Bug
label 2023-10-28 09:42:18 +02:00
onkelbeh added this to the 2023.10.5 milestone 2023-10-28 09:42:22 +02:00
onkelbeh self-assigned this 2023-10-28 11:07:54 +02:00
Owner

all known appearances got fixed, if you find more, please re-open this one.

all known appearances got fixed, if you find more, please re-open [this one](https://git.edevau.net/onkelbeh/HomeAssistantRepository/issues/2219).
onkelbeh added the
Integration: zha
label 2023-12-17 09:47:01 +01:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Depends on
Reference: onkelbeh/HomeAssistantRepository#2219
No description provided.