Skip to content

Commit

Permalink
Merge pull request #685 from tchernobog/master
Browse files Browse the repository at this point in the history
  • Loading branch information
aquaherd authored Jan 12, 2022
2 parents 19d1600 + 3b5dcfd commit 71076a5
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 88 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
fail-fast: false
matrix:
include:
# Test 3.5, which is our minimum version, on 16.04 since the
# Test 3.6, which is our minimum version, on 18.04 since the
# latest Ubuntu does not have it.
- os: ubuntu-16.04
python-version: 3.5
- os: ubuntu-18.04
python-version: 3.6
# On the latest ubuntu, just test the default 3.x version.
- os: ubuntu-latest
python-version: 3
Expand All @@ -33,16 +33,7 @@ jobs:
# Install a specific python version as configured
PACKAGES="$PACKAGES python${{matrix.python-version}}"
# Normal dependencies
PACKAGES="$PACKAGES gettext intltool python3-gi python3-cairo python3-dbus python3-xdg libglib2.0-dev libglib2.0-bin gir1.2-gtk-3.0"
# The gtk-update-icon-cache used to live in libgtk2.0-bin,
# but was moved to its own package. Similar for distutils
# (included by default in python stdlib).
if [ "${{ matrix.os }}" == "ubuntu-16.04" ]; then
PACKAGES="$PACKAGES libgtk2.0-bin"
else
PACKAGES="$PACKAGES gtk-update-icon-cache"
PACKAGES="$PACKAGES python3-distutils"
fi
PACKAGES="$PACKAGES gettext intltool python3-gi python3-cairo python3-dbus python3-xdg libglib2.0-dev libglib2.0-bin gir1.2-gtk-3.0 gtk-update-icon-cache python3-distutils"
# For dbus-launch
PACKAGES="$PACKAGES dbus-x11"
Expand Down Expand Up @@ -70,7 +61,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.5'
python-version: '3.6'
- name: Install flake8
run: |
pip install flake8
Expand Down Expand Up @@ -99,13 +90,13 @@ jobs:
- name: Install GNOME SDK for flatpak
run: |
flatpak remote-add --user --if-not-exists --from flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user -y flathub org.gnome.Platform//3.36 org.gnome.Sdk//3.36
flatpak install --user -y flathub org.gnome.Platform//41 org.gnome.Sdk//41
- name: Build application
run: |
flatpak-builder --repo=build/flatpak/repo build/flatpak/tmp org.gnome.Hamster.json
flatpak-builder --repo=build/flatpak/repo build/flatpak/tmp org.gnome.Hamster.yml
- name: Run tests inside sandbox
run: |
dbus-launch flatpak-builder --run build/flatpak/tmp org.gnome.Hamster.json python3 -m unittest
dbus-launch flatpak-builder --run build/flatpak/tmp org.gnome.Hamster.yml python3 -m unittest
- name: Export bundle and try to install it
run: |
mkdir -p dist
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ flatpak run org.gnome.Hamster [args...]
### Install from sources

#### Dependencies
Hamster needs python 3.5 or newer (not included in below install
Hamster needs python 3.6 or newer (not included in below install
commands). Older versions are not supported.

##### Debian-based
Expand Down Expand Up @@ -171,7 +171,7 @@ GNOME SDK beforehand (an error will notify you about it, if needed). Execute:

```bash
flatpak-builder --force-clean --user --install \
build/flatpak org.gnome.Hamster.json
build/flatpak org.gnome.Hamster.yml
```

This creates a temporary flatpack build folder in the ``build/flatpak``
Expand Down Expand Up @@ -243,7 +243,7 @@ run:
To run the tests inside the flatpak, use:

```bash
flatpak-builder --run build/flatpak org.gnome.Hamster.json \
flatpak-builder --run build/flatpak org.gnome.Hamster.yml \
python3 -m unittest
```

Expand Down
68 changes: 0 additions & 68 deletions org.gnome.Hamster.json

This file was deleted.

47 changes: 47 additions & 0 deletions org.gnome.Hamster.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
app-id: org.gnome.Hamster
runtime: org.gnome.Platform
runtime-version: '41'
sdk: org.gnome.Sdk
command: hamster
modules:
- name: intltool
sources:
- type: archive
url: https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz
md5: 12e517cac2b57a0121cda351570f1e63
cleanup:
- "*"
- name: python3-hamster-dependencies
buildsystem: simple
ensure-writable:
- easy-install.pth
- setuptools.pth
build-commands:
- pip3 install --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST}
dbus-python pyxdg
sources:
- type: file
url: https://dbus.freedesktop.org/releases/dbus-python/dbus-python-1.2.18.tar.gz
sha256: 92bdd1e68b45596c833307a5ff4b217ee6929a1502f5341bae28fd120acf7260
- type: file
url: https://files.pythonhosted.org/packages/ea/13/de39ddf4f9f9cea0c7684cd54a50d79c97ea99c9f6aed798fd13d0bd4609/pyxdg-0.27-py2.py3-none-any.whl
sha256: 2d6701ab7c74bbab8caa6a95e0a0a129b1643cf6c298bf7c569adec06d0709a0
- name: hamster
buildsystem: simple
builddir: true
prefix: "/app"
build-commands:
- "./waf configure --prefix=${FLATPAK_DEST}"
- "./waf build"
- "./waf install"
sources:
- type: dir
path: "."
finish-args:
- "--socket=wayland"
- "--socket=fallback-x11"
- "--filesystem=xdg-documents"
- "--own-name=org.gnome.Hamster"
- "--own-name=org.gnome.Hamster.GUI"
- "--own-name=org.gnome.Hamster.WindowServer"

0 comments on commit 71076a5

Please sign in to comment.