Giter Site home page Giter Site logo

snap-examples's People

Contributors

abulka avatar jenyay avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

abulka

snap-examples's Issues

Example building using core18 approach

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?

How to build for Ubuntu 18.04

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.