jenyay / snap-examples Goto Github PK
View Code? Open in Web Editor NEWExamples for snapcraft
Examples for snapcraft
Here is a version of the snapcraft.yaml
example 0.5.1 which builds successfully under Ubuntu 18.04 using the core18 approach. All I did was add the line base: core18
and replace the after: [desktop-gtk3]
with the desktop-gtk3:
part. I also pointed to a more recent wxPython wheel.
name: andy-testsnap-py
version: 0.5.1
summary: 'Single-line elevator pitch for your amazing snap'
description: "This is my-snap's description. You have a paragraph or two to tell the\nmost important story about your snap. Keep it under 100 words though,\nwe live in tweetspace and your description wants to look good in the snap\nstore.\n"
grade: devel
confinement: strict
base: core18
apps:
andy-testsnap-py:
command: 'desktop-launch python3 $SNAP/usr/bin/testsnap.py'
plugs:
- x11
- unity7
- pulseaudio
- home
- gsettings
- network
environment:
LD_LIBRARY_PATH: '$LD_LIBRARY_PATH:$SNAP/usr/lib/x86_64-linux-gnu/pulseaudio'
parts:
desktop-gtk3:
build-packages:
- build-essential
- libgtk-3-dev
make-parameters:
- FLAVOR=gtk3
plugin: make
source: 'https://github.com/ubuntu/snapcraft-desktop-helpers.git'
source-subdir: gtk
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libgtk-3-0
- libgdk-pixbuf2.0-0
- libglib2.0-bin
- libgtk-3-bin
- unity-gtk3-module
- libappindicator3-1
- locales-all
- xdg-user-dirs
- ibus-gtk3
- libibus-1.0-5
- fcitx-frontend-gtk3
andy-testsnap-py:
plugin: python
python-version: python3
source: .
stage-packages:
- libssl-dev
- libjpeg-dev
- libtiff-dev
- libsdl1.2-dev
- libnotify-dev
- freeglut3
- ibus-gtk3
- libwebkitgtk-3.0-0
- zlib1g
- libsm6
- libpulse0
python-packages:
- 'https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/wxPython-4.0.4-cp36-cp36m-linux_x86_64.whl'
override-build: "snapcraftctl build\ncp $SNAPCRAFT_PART_SRC/testsnap.py $SNAPCRAFT_PART_INSTALL/usr/bin/\nchmod +x $SNAPCRAFT_PART_INSTALL/usr/bin/testsnap.py\n"
Perhaps I can prepare a pull request for a v0.6 version once this is fully debugged :-)
Because although it builds and even runs locally OK, I can't push it to the snapcraft store because of a missing? reference to libslang.so
which is symlinked.
Error while processing...
The store was unable to accept this snap.
- package contains external symlinks: usr/lib/x86_64-linux-gnu/libslang.so
I have opened an issue on the snapcraft forums hoping someone can help. Perhaps Eugeniy, you have a solution?
Thanks for these examples. I'm trying to build your last example 0.5 for Ubuntu 18.04, so changed
python-packages:
- https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/wxPython-4.0.1-cp35-cp35m-linux_x86_64.whl
to
python-packages:
- https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/wxPython-4.0.4-cp37-cp37m-linux_x86_64.whl
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:
Pulling testsnap-py
wxPython-4.0.4-cp37-cp37m-linux_x86_64.whl is not a supported wheel on this platform.
Failed to run '/home/andy/Devel/snap-examples/v_0.5.1/parts/testsnap-py/install/usr/bin/python3 -m pip download --disable-pip-version-check --dest /home/andy/Devel/snap-examples/v_0.5.1/parts/testsnap-py/python-packages https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/wxPython-4.0.4-cp37-cp37m-linux_x86_64.whl': Exited with code 1.
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
https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/wxPython-4.0.4-cp37-cp37m-linux_x86_64.whl
https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/wxPython-4.0.3-cp37-cp37m-linux_x86_64.whl
https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/wxPython-4.0.2-cp37-cp37m-linux_x86_64.whl
They all give the same error. Investigating my platform info:
$ python3 -c "import pip; print(pip.pep425tags.get_platform())"
linux_x86_64
$ python3 -c "import pip; print(pip.pep425tags.get_abi_tag())"
cp37m
$ python3 -c "from pip import pep425tags;print(pep425tags.supported_tags)"
[('cp37', 'cp37m', 'manylinux1_x86_64'), ('cp37', 'cp37m', 'linux_x86_64'), ('cp37', 'abi3', 'manylinux1_x86_64'), ('cp37', 'abi3', 'linux_x86_64'), ('cp37', 'none', 'manylinux1_x86_64'), ('cp37', 'none', 'linux_x86_64'), ('cp36', 'abi3', 'manylinux1_x86_64'), ('cp36', 'abi3', 'linux_x86_64'), ('cp35', 'abi3', 'manylinux1_x86_64'), ('cp35', 'abi3', 'linux_x86_64'), ('cp34', 'abi3', 'manylinux1_x86_64'), ('cp34', 'abi3', 'linux_x86_64'), ('cp33', 'abi3', 'manylinux1_x86_64'), ('cp33', 'abi3', 'linux_x86_64'), ('cp32', 'abi3', 'manylinux1_x86_64'), ('cp32', 'abi3', 'linux_x86_64'), ('py3', 'none', 'manylinux1_x86_64'), ('py3', 'none', 'linux_x86_64'), ('cp37', 'none', 'any'), ('cp3', 'none', 'any'), ('py37', 'none', 'any'), ('py3', 'none', 'any'), ('py36', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')]
Any idea what I am doing wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.