Closed scottfurry closed 1 year ago
Thanks so much for the detailed investigatory legwork, @scottfurry. This makes you our first dissatisfied Kivy customer, for which I'm surprisingly grateful. I wasn't quite sure whether anyone else was actually attempting to profit from our suite of Kivy ebuilds. Surprise twist: they are.
I must confess I never actually ran any of the examples. An upcoming Kivy app from my wife and I leverages a pure KivyMD workflow, which presumably replaces most (...probably all) of Kivy's bundled assets with Material Design-compliant equivalents. Incidentally, did I mention that KivyMD is phenomenal? Because it is.
Shockingly, the main KivyMD lead somehow actively develops from the hottest hot spot in the world: the occupied territories of eastern Ukraine. I perform daily ablutions for his safety. :scream:
Okay! It's back to the Gentoo slave mines for us, then. Your suspicions that...
...a post-install step for python packages was not undertaken in the ebuild. This may be a step assumed to execute before but changes to gentoo eclass structure are now causing grief.
...are almost certainly correct. We've switched to DISTUTILS_USE_PEP517
across most our Python ebuilds – including Kivy. That might now be biting us like Ontario's most terrifying snake, the Massasauga Rattler. </shudders>
Alternately, this might simply be an omission on our part. Kivy's non-trivial build system requires manually exporting a number of shell variables to Kivy's setup.py
. We had this to say about that:
# Export environment variables expected by this package's "setup.py"
# (listed in the same order for maintainability). However, note that:
# * These variables are almost entirely undocumented. It is what it is.
# * These variables are listed undercase in "setup.py" but *MUST*
# nonetheless be declared as uppercase here. It is what it is.
Oh, boy. I can reluctantly confirm that enabling the examples
USE flag produces a totally b0rked installation that fails to install either kivy.data
or any of Kivy's Cythonized C extensions (including the kivy._clock
C extension you noted above). This is almost certainly an upstream issue. Until I can get a better grip on this rip-roaring whitewater raft ride, please disable the examples
USE flag.
And this is why I constantly shake my head and get crippling migraines.
Should I be grateful you actually posted a picture of snake and not a politician? Canadian politics aside.
I feel your pain.
I read the notes for [Installation] Enabling "USE_MESAGL=1" breaks everything referenced in the ebuild. Wow... ugh...
I had a painful time today getting anything kivy to run. First the ebuild, then virtualenv pip with "kivy[full]", and finally virtualenv again using "kivy[dev,full]". With the example programs installed, I could see what a normal output should look like during execution. It was then I discovered that my basic script had an error. I was calling app.run
- missing parenthesis. \<facepalm>. I then backtracked the various install methods to see what would break. This produced messages posted above.
The missing directories shouldn't be too much problem to fix - one hopes.
As for python install under gentoo ...sigh... they just keep making things more complicated. You can see the code but then have to wrap your head around intent with no visuals of the Bash environment implications. And who bothers to write documentation anymore? \<sarcasm>
FreeBSD is looking more realistic by the minute.
The biggest pain is that python is not exactly resolute in terms of install methodology. There are at least half a dozen ways to install python packages?! Distribution and Packaging Maintainer's nightmare. To think this is by design from python devs. pip
everything regardless of distribution installation. Then it's virtualenv pip
everything creating duplicate structure. smh.
Basic gist is that Kivy examples could not be executed because the libraries do not get compiled. It works in a virtualenv, but not in an ebuild. I just don't have the requisite knowledge nor time to dig through gentoo interals to figure out. Report and cross my fingers.
I'll disable examples, reinstall, and report findings probably tomorrow.
I agree, kivy is cool. Now if we can just ease the software into the right place in the system without collateral damage. Or should I be up'ing my medication at this point?
Oh, I see. Kivy's setup.py
is insane. For unknown reasons, Kivy reuses the same setup.py
script to install either Kivy or the external Kivy-examples
package. That's not the insane part. The insane part is that these two installation targets are mutually exclusive. You can either install Kivy or you can install Kivy-examples
. Pick one.
Obviously, anyone installing Kivy wants Kivy to be installed. If they wanted a separate Kivy-examples
package, they should have just packaged Kivy-examples
properly as a separate project. Instead, we are here. I continue shaking my head and receiving excruciating migraines.
Let's just quietly kludge this away – or remove the examples
USE flag entirely if our hacks fail. Don't fail us now, hacky sed
one-liners! :sob:
From the install doc notes:
python -m pip install "kivy[base]" kivy_examples
So that means the setup.py is called twice. First, to install the kivy infrastructure then a second time to install the examples. oi vey
Odd suggestion - spin examples out to it's own ebuild. Sure, it's overhead but you can be confident that the base install will not become corrupted in the process. My $0.02 with no GST.
What!? NO GST!?!? Call the CRA, folks. Oh, wait... you can't actually call the CRA. No one can. The CRA don't take calls, because why would taxpayer-funded agencies communicate with taxpayers? The CRA calls you. Actually... I'm pretty sure they don't even do that, because the human element was obsoleted away long ago. Now it's all cutting-edge COBOL "automation" and Phoenix Pay "solutions."
This is why I lament at night.
I discovered something! Yes, it's true. Kivy's setup.py
supports a hidden undocumented KIVY_SPLIT_EXAMPLES
option. If we enable that and stop enabling the hidden undocumented KIVY_BUILD_EXAMPLES
option that destroys Manhattan, we may just be able to stop the alien invasion in time. Probably not, of course. But this is mankind's last hope.
Fulfil your destiny, KIVY_SPLIT_EXAMPLES
! Do something for once.
Fulfil your destiny,
KIVY_SPLIT_EXAMPLES
! Do something for once.
Help me, KIVY_SPLIT_EXAMPLES
. You're my only hope...
FWIW, I little trick I picked up when I was doing package maintaining for different OS's was to go look at what other distributions do installing stuff. The Repology site shows kivy installation. By clicking on the version value, you can click through to a page, for the most part, to distributions packaging information.
For example, Slack page for kivy has links to the SlackBuild file define how to install. The text file is right there to examine.
Debian(Unstable) is not at the latest release but clicking on the version 1.11.0
takes you to the source details. You can see that Debian shows two binary packages - 1) core and 2) examples. A link at the bottom takes you to Debian's git repository. You can browse the package debian
directory for the install instructions.
Caveat Emptor YMMV
Repology. That is such packaging h0tness. I now stand on the shoulders of giants. I'm acrophobic, so the vertiginous fear I feel while standing so high up doesn't feel great. I carefully climb down. Now with grey hair and a wrinkly chin, I vow never to do that again. :older_adult:
By which I meant to say... resolved by f4e7558. If you get a chance in the morning, would you refreshing the repo and trying again?
Unsurprisingly, KIVY_SPLIT_EXAMPLES
behaves badly by installing examples to the non-standard /usr/share/kivy-examples/
directory. Who would ever look there for an example? I am confident the answer is: "No sane Canadian, that is who." I shrug shoulders non-committally and then just rip everything out in favour of a trivial one-liner:
use examples && dodoc -r examples
Friends always let friends one-liner and commit. Thanks again for the tremendous assistance on both this and prior issues, @scottfurry. You remain the Hero I don't deserve but nonetheless keep getting.
We're all in this together. Keep your stick on the ice.
It is unfortunate that adherence to LFS (Linux File System) is scatter shot. And distributions having their own conventions and expectations just adds unneeded complications. Package Maintainers do their best to enforce such conventions but this action is dependent on a cohesive distribution standard/philosophy. My impression of Gentoo is the matter is analogous to the line from Pirates of the Caribbean: "...more what you'd call "guidelines" than actual rules."
I can confirm the fixes implemented work. I can execute the various demo and examples produced by kivy. Thanks for the hard work. Your efforts are much appreciated.
Oh, you're most welcome. It's a genuine joy to hammer out issues like this with a fellow gentleman of culture. And...
My impression of Gentoo is the matter is analogous to the line from Pirates of the Caribbean: "...more what you'd call "guidelines" than actual rules."
This is the Gentoo way. Gentoo attracts the well-meaning anti-authoritarian types like myself, who then inevitably rebel against everything – including Gentoo guidelines. We're the Green Party of Canada gone Linux distro: defeated from within by self-destructive bickering over ideological purity and the disastrous cult of personality, we rise from the ashes of our own pettiness to compute another day.
Unrelatedly...
@beartype is this Pythonic thing I do with actively maintained ebuilds in raiagent
. If you have any lingering interest in type hints, I'd be delighted to hear your thoughts.
Have a slow and easy slide into September. You rock, @scottfurry. :guitar: :notes:
We're the Green Party of Canada gone Linux distro: defeated from within by self-destructive bickering over ideological purity and the disastrous cult of personality, we rise from the ashes of our own pettiness to compute another day.
I'm partial to the Lobster Party of Canada, myself personally. They got free air time during a federal election decades ago. Guy siting behind a desk with his feet up and a 2-4 in front of him decreeing that Canada's ills could be solved by having more kids. More kids equals more taxpayers. More taxpayers means more money for government programs. Made a bit of twisted sense at the time.
Will look into provided links. Thanks for tagging along.
Installed the packages
dev-python/Kivy
anddev-python/kivymd
successfully. Thedev-python/Kivy
had the use flagexamples
. Statement from eix for kivy:While attempting to execute code from the
/usr/share/kivy_examples
, command line became littered with python exception messages. One message of note:The directory
/usr/lib/python3.10/site-packages/kivy/data/
does not exist in filesystem. If I copy over the directory from a virtual environment install, problems go away. Thedata
directory is used by kivy for various support files (graphics, fonts, et al).The main effort was to execute the kivy demo sample
kivy-examples/demo/kivycatalog/main.py
, which highlights various features and capabilities of kivy widgets. With the above problem of missingdata
directory fixed, the demo program would continue to fail, albeit with a more trimmed down exception. Reported error:I suspect that a post-install step for python packages was not undertaken in the ebuild. This may be a step assumed to execute before but changes to gentoo eclass structure are now causing grief. But that's just a guess on my part.