Closed abulka closed 5 years ago
Try to install wheel package with
python -m pip install wheel
Hi thanks. Yeah that was already installed. I decided to start with clean Ubuntu 16.04 (not 18.04) like you did and try my luck. I was able to build and run the snap. I did get a build warning
Files from the build host were migrated into the snap to satisfy dependencies that would otherwise not be met. This feature will be removed in a future release. If these libraries are needed in the final snap, ensure that the following are either satisfied by a stage-packages entry or through a part:
usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
should libpython3.5m.so.1.0
or something be added to the snapcraft.yaml?
Also, when I run, I get the error
$ testsnap-py -h
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
but the wxPython app luckily still runs. Any thoughts on how serious this error might be and how to avoid it?
usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
No, I did not add this file.
Gtk-Message: Failed to load module "canberra-gtk-module"
See this link - https://askubuntu.com/questions/208431/failed-to-load-module-canberra-gtk-module
Also you can see other my snap package with wxPython - https://github.com/Jenyay/outwiker/blob/dev/need_for_build/snap/snap/snapcraft.yaml
I build it in Ubuntu 16.04 with "snapcraft cleanbuild" command
Thank you for that information and all your examples. Your OutWiker looks interesting, though the download page https://jenyay.net/Outwiker/English doesn't seem to give an easy one click snapcraft install url? I'm curious, isn't that the whole point of using snap?
If you ever get a chance, it would be great if you could add an example for building your tiny test app using Python 3.7 and wxPython 4.04 using the new, recommended, "core18" approach that snapcraft 3.0 uses. There is no official wheel for wxPython using Python 3.7 under Ubuntu 16.04, so I need to build under 18.04.
Apparently the new core18 multipass/vm based approach means changes to the snapcraft.yaml file as there are no longer remote parts https://docs.snapcraft.io/remote-reusable-parts/4233, which are lines like after: [desktop-gtk3] There is a post https://forum.snapcraft.io/t/snapcraft-3-core18-and-desktop-apps/9520 that talks about how to replace that remote part reference with a new "desktop-gtk3:" part as well as another post https://bugs.launchpad.net/snapcraft/+bug/1800057 that attempts to do something similar, though I am really out of my depth with this stuff, as I suspect other changes to the yaml file will be needed, and I find the official documentation sparse, complex and unhelpful. I'm just a wxPython developer who wants to get a snap app built for my linux users - not a linux guru! I think many wxPython users would appreciate such an example, if you ever have time.
Thank you for that information and all your examples. Your OutWiker looks interesting, though the download page https://jenyay.net/Outwiker/English doesn't seem to give an easy one click snapcraft install url? I'm curious, isn't that the whole point of using snap?
At the moment, snap is being used with the beta version - https://jenyay.net/Outwiker/UnstableEn
If you ever get a chance, it would be great if you could add an example for building your tiny test app using Python 3.7 and wxPython 4.04 using the new, recommended, "core18" approach that snapcraft 3.0 uses.
I have not tried to build a snap from core18. I hope that I will find time to try.
As for wxPython. Maybe build wheel manually? The build process is pretty simple there. I wrote a docker files for my tasks - https://github.com/Jenyay/outwiker/tree/dev/need_for_build/build_wxpython
Gtk-Message: Failed to load module "canberra-gtk-module" See this link - https://askubuntu.com/questions/208431/failed-to-load-module-canberra-gtk-module
Thanks for that link. Ok so I installed that locally
sudo apt install libcanberra-gtk-module
and also added
stage-packages:
- libcanberra-gtk-module
to the snapcraft.yaml. Unfortunately the error/warning still appears when I build, install then run the snap locally.
Not sure what happens when the snap is actually deployed to other people, because I haven't been able to push the 0.5.1 snap example built with core18 yet because of an issue I have documented in #2. Would you have any other ideas on how to fix the canberra-gtk errors/warnings?
$ testsnap-py -h
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
P.s. I also tried sudo apt-get install libcanberra-gtk-module:i386
locally - same errors. And adding libcanberra-gtk-module:i386
to the snapcraft.yaml makes the snapcraft build fail - Failed to fetch stage packages: Error downloading packages for part 'andy-testsnap-py': The package 'libcanberra-gtk-module:i386' was not found.
Turns out everybody building snaps gets this error, and it is just a warning
the canberra stuff is fine and normal (it just tells you that it wont play sound events for button clicks and other GTK events), that isnt fatal or anything and all snap apps show it on all distros (brcause the desktop helper simply does not include canberra). https://forum.snapcraft.io/t/spotify-failed-to-load-module-canberra-gtk-module/6379
Thanks for these examples. I'm trying to build your last example 0.5 for Ubuntu 18.04, so changed
to
Note the change from 16.04 to 18.04, and the change from cp35 to cp37 (presumably this is what is needed for my Python 3.7). I'm getting the error:
I get the same error when I substitute any of the previous versions of wxPython listed at https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/ viz
They all give the same error. Investigating my platform info:
Any idea what I am doing wrong?