Closed davidkleiven closed 4 years ago
Thank you @davidkleiven for the report. I assumed it would have been an issue, here's how I addressed it for some other garden projects. https://github.com/kivy-garden/zbarcam/blob/2019.1020/src/kivy_garden/zbarcam/__init__.py#L14 Basically the idea is to skip the import if we detect pip install. Give this a try and feel free to pull request the same fix
I ran into the same issue with cython flowers, here's the fix: https://github.com/kivy-garden/cython_flower/tree/master/kivy_garden/cython_flower. But I didn't implement the fix for normal flowers. Fell free to open a PR to the demo flower as well as this repo separating the version into a new file.
I don't like the detecting pip fix, as that's a but too automatic and doesn't directly solve the issue. Moving version to its own file should properly take care of this.
Ok, thanks. The solution in cython-flower looks good. I opened a PR to the demo flower. I will open a similar fix here, if that PR gets accepted.
Describe the bug Applications that depend on
kivy_garden
(and thuskivy
) fails whenkivy
is not installed before the package is installed.To Reproduce Create a small application that depend on
kivy_garden
and install it on a system that does not havekivy
Expected behavior Since
kivy_garden
depends onkivy
, I would expect thatkivy
gets installed beforekivy_garden
is installed.Logs/output
Additional context The reason for the failure is that
setup.py
import__version__
and hencekivy
will be imported. Therefore, it does not matter whether one specifykivy
as a dependency of the project one is trying to install or not. @matham Is this intentional? In that case how can one install an app that depend onkivy_garden.graph
?Since it is only to get the version one solution would be to not import the
__version__
but extract it with RegEx or something and require apps that depend onkivy_garden
to installkivy
as a dependency.