dev-python/python-synology: dependencies can't be respected #14

Closed
opened 2020-08-23 16:07:23 +02:00 by zentoo · 8 comments

I'm trying to add synologydsm USE flag for homeassistant but it's not possible to resolve dependencies at emerge time because there is no version of dev-python/urllib3 than can satisfy dev-python/python-synology:

python-synology-0.8.2.ebuild:

RDEPEND=">=dev-python/requests-2.20.0[${PYTHON_USEDEP}]
    >=dev-python/urllib3-1.24.3[${PYTHON_USEDEP}]
    <dev-python/urllib3-1.25[${PYTHON_USEDEP}]
    >=dev-python/future-0.18.2[${PYTHON_USEDEP}]"

dev-python/urllib3:
Available versions: 1.24[1] 1.24.1[1] 1.24.2^t 1.24.2[1] 1.25.3[1] 1.25.3-r1[1] 1.25.9^t (~)1.25.10^t

I'm trying to add **synologydsm** USE flag for **homeassistant** but it's not possible to resolve dependencies at emerge time because there is no version of **dev-python/urllib3** than can satisfy **dev-python/python-synology**: python-synology-0.8.2.ebuild: ``` RDEPEND=">=dev-python/requests-2.20.0[${PYTHON_USEDEP}] >=dev-python/urllib3-1.24.3[${PYTHON_USEDEP}] <dev-python/urllib3-1.25[${PYTHON_USEDEP}] >=dev-python/future-0.18.2[${PYTHON_USEDEP}]" ``` dev-python/urllib3: ` Available versions: 1.24[1] 1.24.1[1] 1.24.2^t 1.24.2[1] 1.25.3[1] 1.25.3-r1[1] 1.25.9^t (~)1.25.10^t`
Author

Even after have created dev-python/urllib3-1.24.3 from dev-python/urllib3-1.24.2 there is another problem: no ebuild for virtual/python-ipaddress.

The only possible choice is dev-python/ipaddress but this ebuild only have support of python-2.7.

Even after have created dev-python/urllib3-1.24.3 from dev-python/urllib3-1.24.2 there is another problem: no ebuild for **virtual/python-ipaddress**. The only possible choice is **dev-python/ipaddress** but this ebuild only have support of **python-2.7**.
onkelbeh self-assigned this 2020-08-24 18:39:07 +02:00
Owner

Seems some packages vanished during Python 2.7 cleanup:

https://github.com/gentoo/gentoo/commit/87c7cc3b950085dacd8ba7217b65a5830fb79fa2#diff-db8857b420665169e36ad60c8dfc23a5, I will remove dev-python/ipaddress RDEP.

Gotta find out why they pin this old urllib3.
Will check for it tomorrow.

Seems some packages vanished during Python 2.7 cleanup: https://github.com/gentoo/gentoo/commit/87c7cc3b950085dacd8ba7217b65a5830fb79fa2#diff-db8857b420665169e36ad60c8dfc23a5, I will remove `dev-python/ipaddress` RDEP. Gotta find out why they pin this old urllib3. Will check for it tomorrow.
Author

The funny things, it's I don't have the USE flag actually and so all corresponding dependencies but I have try to add the integration on homeassistant dashboard and it have worked directly !

So I guess that homeassistant can download by itself needed dependencies.
I've found these dependencies in ~homeassistant/deps/lib/python3.7/site-packages.

So what is the point to have USE flags for integration dependencies ?
I recognise that it's a lot of work on your side to maintain this but I stay confused that I can install the same integration by USE flag usage or by homeassistant directly.

Can you elaborate on this points:

  • Is the purpose of this repo to got dependencies on system side by choice ?
  • Is there a diffference at usage between both way ?
  • Which one have priority for homeassistant ?
  • How can I clean local dependencies to get rid of them in favor of system ones ?

Finally there are homeassistant local dependencies related to synologydsm that i got:

[LOCAL]         python_synology-0.8.2
[LOCAL][GENTOO] requests-2.24.0
[LOCAL][GENTOO] requests_toolbelt-0.9.1
[LOCAL][GENTOO] urllib3-1.25.10
[GENTOO]        future-0.18.2 
The funny things, it's I don't have the USE flag actually and so all corresponding dependencies but I have try to add the integration on homeassistant dashboard and it have worked directly ! So I guess that homeassistant can download by itself needed dependencies. I've found these dependencies in ~homeassistant/deps/lib/python3.7/site-packages. So what is the point to have USE flags for integration dependencies ? I recognise that it's a lot of work on your side to maintain this but I stay confused that I can install the same integration by USE flag usage or by homeassistant directly. Can you elaborate on this points: - Is the purpose of this repo to got dependencies on system side by choice ? - Is there a diffference at usage between both way ? - Which one have priority for homeassistant ? - How can I clean local dependencies to get rid of them in favor of system ones ? Finally there are homeassistant local dependencies related to synologydsm that i got: ``` [LOCAL] python_synology-0.8.2 [LOCAL][GENTOO] requests-2.24.0 [LOCAL][GENTOO] requests_toolbelt-0.9.1 [LOCAL][GENTOO] urllib3-1.25.10 [GENTOO] future-0.18.2 ```
Owner

Home Assistant is able to download most required components in it's own virtual environment, if they do not exist at the system otherwise. This mostly works. You will find HA's Venv in /etc/homeassistant/deps/, if you install a component with portage, it will live in /usr/lib/python3.7/site-packages/.

HA first looks in it's venv, then in the running Pythons site-packages folder. The modules are identical in both cases. Not all components can live in the venv, all Core dependencies and most of the modules from package_constraints.txt cannot. In newer Ebuilds of app-misc/homeassistant I made seperate sections in the ebuild, so you can see where the dependencies are originating from.

On my productive box, I always delete the contents (if it's not already emtpy) of /etc/homeassistant/deps/ prior restarting Home Assistant on every version change, I try to keep this directory empty, or at least as small as possible. I like it when portage takes care about the stuff I install on my system. Sometimes HA's venv is needed anyway for version incompatibilities and other problems.

Some guys are very curious in hard pinning versions of dependent libraries, whether this is neccesary or not. python-synology, for example, currently pins urllib3 to an outdated version without a reason.
There is already a ticket of Martin Hjelmare taking care.

Next:
python-synology should be fixed now, at least it compiles.
All newer sources from Pypi are incomplete, I opened a Ticket there. In the meantime, I changed SRC_URI to codeload.github.com. This sources are OK.

Please re-check and close this here if it's OK for you.
Thanks for reporting.

Home Assistant is able to download most required components in it's own virtual environment, if they do not exist at the system otherwise. This mostly works. You will find HA's Venv in `/etc/homeassistant/deps/`, if you install a component with portage, it will live in `/usr/lib/python3.7/site-packages/`. HA first looks in it's venv, then in the running Pythons site-packages folder. The modules are identical in both cases. Not all components can live in the venv, all Core dependencies and most of the modules from package_constraints.txt cannot. In newer Ebuilds of app-misc/homeassistant I made seperate sections in the ebuild, so you can see where the dependencies are originating from. On my productive box, I always delete the contents (if it's not already emtpy) of `/etc/homeassistant/deps/` prior restarting Home Assistant on every version change, I try to keep this directory empty, or at least as small as possible. I like it when portage takes care about the stuff I install on my system. Sometimes HA's venv is needed anyway for version incompatibilities and other problems. Some guys are very curious in hard pinning versions of dependent libraries, whether this is neccesary or not. python-synology, for example, currently pins urllib3 to an outdated version without a reason. There is already a [ticket of Martin Hjelmare](https://github.com/ProtoThis/python-synology/issues/63) taking care. **Next:** python-synology should be [fixed now](https://git.edevau.net/onkelbeh/HomeAssistantRepository/commit/702d242c624028b492a661d21288509c784a8fad), at least it compiles. All newer sources from Pypi are incomplete, I opened a [Ticket](https://github.com/ProtoThis/python-synology/issues/66) there. In the meantime, I changed SRC_URI to codeload.github.com. This sources are OK. Please re-check and close this here if it's OK for you. Thanks for reporting.
Owner

And one more thing:
if you find something weird in /etc/homeassistant/deps/, please let me know.

And one more thing: if you find something weird in `/etc/homeassistant/deps/`, please let me know.
Author

Thanks for your clear explanations.
So now I backup and clean deps directory too to watch what is removed after your fixes.

Related to synologydsm USE flag and corresponding integration: It's working perfectly now. So I close this ticket.

I'm opening another ticket about my integrations that need home-assistant dependencies related to this deps directory.

Thanks for your clear explanations. So now I backup and clean deps directory too to watch what is removed after your fixes. Related to synologydsm USE flag and corresponding integration: It's working perfectly now. So I close this ticket. I'm opening another ticket about my integrations that need home-assistant dependencies related to this deps directory.
Owner

Are you sure this is working?
Take a look at https://github.com/home-assistant/core/issues/39278

Are you sure this is working? Take a look at https://github.com/home-assistant/core/issues/39278
Author

Yes it's working perfectly. I got all monitoring sensors for my Synology NAS.

Yes it's working perfectly. I got all monitoring sensors for my Synology NAS.
Sign in to join this conversation.
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: onkelbeh/HomeAssistantRepository#14