Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Snap to core22 #96

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ url = "https://pypi.org/simple"
verify_ssl = true

[packages]
pygobject = "==3.38.0"
manimpango = "==0.3.0"
setproctitle = "==1.2.2"
manimpango = "==0.4.0"
setproctitle = "==1.3.2"

[dev-packages]
black = "==19.10b0"
flake8 = "*"

[requires]
python_version = "3.8"
python_version = "3.10"

[scripts]
start = "python -m emote"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"emote = emote.__init__:main",
]
},
install_requires=["pygobject==3.36.0", "manimpango==0.3.0", "setproctitle==1.2.2"],
install_requires=["manimpango==0.4.3", "setproctitle==1.3.2"],
)
77 changes: 18 additions & 59 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,56 +8,33 @@ description: |
out of your way.
icon: snap/gui/emote.svg

base: core18
environment:
# Workaround for https://forum.snapcraft.io/t/python-plugin-gnome-3-extension-error/33396.
PYTHONPATH: ${SNAP}/lib/python3.10/site-packages:${SNAP}/usr/lib/python3/dist-packages:${PYTHONPATH}


base: core22
grade: stable # or devel. Must be 'stable' to release into candidate/stable channels
confinement: strict # or devmode

parts:
emote:
plugin: python
python-version: python3
source: .
python-packages:
- wheel
- pygobject
- setuptools
build-environment:
# Workaround for https://forum.snapcraft.io/t/python-plugin-gnome-3-extension-error/33396.
- PATH: ${CRAFT_PART_INSTALL}/bin:${PATH}
- PYTHONPATH: ""
build-packages:
- python3-setuptools
- python3-xlib
- pkg-config
build-packages:
- libgirepository1.0-dev
stage-packages:
- libcairo-gobject2
- libcairo2
- libfontconfig1
- libfreetype6
- libgirepository-1.0-1
- libpixman-1-0
- libpng16-16
- libx11-6
- libxau6
- libxcb-render0
- libxcb-shm0
- libxcb1
- libxdmcp6
- libxext6
- libxrender1
- libkeybinder-3.0-0
- gir1.2-keybinder-3.0
- python3-distutils-extra
- sound-theme-freedesktop
- pulseaudio-utils
# Core PyGObject dependencies.
- python3-gi
- gir1.2-unity-5.0
- gir1.2-notify-0.7
- python3-gi-cairo
- gir1.2-gtk-3.0
- gir1.2-pango-1.0
- appmenu-gtk2-module
- appmenu-gtk3-module
- libcanberra-gtk-module
- libcanberra-gtk3-module
# xdotool
# Dependencies for keybinding functionality.
- gir1.2-keybinder-3.0
- xdotool
static:
plugin: dump
Expand All @@ -74,20 +51,6 @@ parts:
- usr/share/applications/emote.desktop
- usr/share/icons/emote.svg

plugs:
gtk-3-themes:
interface: content
target: $SNAP/share/themes
default-provider: gtk-common-themes
icon-themes:
interface: content
target: $SNAP/share/icons
default-provider: gtk-common-themes
sound-themes:
interface: content
target: $SNAP/share/sounds
default-provider: gtk-common-themes

slots:
dbus-daemon:
interface: dbus
Expand All @@ -96,15 +59,11 @@ slots:

apps:
emote:
command: desktop-launch $SNAP/static/prepare-launch $SNAP/bin/emote
command: static/prepare-launch $SNAP/bin/emote
environment:
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu
desktop: usr/share/applications/emote.desktop
extensions: [gnome-3-28]
extensions: [gnome]
slots: [dbus-daemon]
common-id: com.tomjwatson.Emote
autostart: emote.desktop
plugs:
- desktop
- desktop-legacy
- x11
- gsettings
- wayland
4 changes: 4 additions & 0 deletions static/prepare-launch
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ fi
# clipboard management do no yet work under wayland.
export GDK_BACKEND="x11"

# Workaround for https://bugs.launchpad.net/snapcraft/+bug/1998269.
export FONTCONFIG_PATH=$SNAP/etc/fonts/config.d
export FONTCONFIG_FILE=$SNAP/etc/fonts/fonts.conf

exec "$@"