Skip to content

Commit

Permalink
Use new way to set app version
Browse files Browse the repository at this point in the history
  • Loading branch information
hongquan committed Jan 6, 2025
1 parent e31a936 commit c8db12c
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 65 deletions.
13 changes: 1 addition & 12 deletions cobang/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,5 @@

from pathlib import Path

from single_version import get_version


__version__ = get_version('cobang', Path(__file__).parent.parent)

if __version__.replace('.', '').replace('0', '') == '':
try:
# This file is put by Meson build script,
# which doesn't support generate Python package metadata.
from .fallback_version import VERSION
__version__ = VERSION
except ImportError:
pass
__version__ = '0.14.2'
7 changes: 7 additions & 0 deletions data/vn.hoabinh.quan.CoBang.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
</kudos>

<releases>
<release version="0.14.2" date="2025-01-06" urgency="medium">
<description translate="no">
<p>Change icons.</p>
<p>Drop single-version dependency.</p>
<p>Add Spanish translation.</p>
</description>
</release>
<release version="0.14.1" date="2024-06-19" urgency="medium">
<description translate="no">
<p>Fix copy/paste image.</p>
Expand Down
11 changes: 1 addition & 10 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('cobang',
version: '0.14.1',
version: '0.14.2',
meson_version: '>= 0.61',
default_options: [
'warning_level=2',
Expand Down Expand Up @@ -33,13 +33,4 @@ subdir('data')
subdir('exe')
subdir('po')

configure_file(
input: 'misc/fallback_version.py.in',
output: 'fallback_version.py',
configuration: conf,
install: true,
install_dir: python.get_install_dir() / meson.project_name()
)


meson.add_install_script('flatpak/meson/postinstall.py')
1 change: 0 additions & 1 deletion misc/fallback_version.py.in

This file was deleted.

22 changes: 8 additions & 14 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[project]
name = "cobang"
version = "0.14.1"
description = "QR code and barcode scanner for Linux desktop"
authors = [
{name = "Nguyễn Hồng Quân", email = "[email protected]"},
Expand All @@ -10,12 +9,12 @@ dependencies = [
"Pillow<11.0.0,>=10.1.0",
"requests<3.0.0,>=2.31.0",
"kiss-headers<3.0.0,>=2.3.1",
"single-version<2.0.0,>=1.5.1",
"brotlicffi>=1.1.0.0",
]
requires-python = ">=3.8,<4.0"
readme = "README.rst"
license = {text = "GPL-3.0-or-later"}
dynamic = ["version"]

[project.urls]
homepage = "https://github.com/hongquan/CoBang"
Expand Down
39 changes: 13 additions & 26 deletions vn.hoabinh.quan.CoBang.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app-id: vn.hoabinh.quan.CoBang
runtime: org.gnome.Platform
runtime-version: '46'
runtime-version: '47'
sdk: org.gnome.Sdk
command: cobang
finish-args:
Expand Down Expand Up @@ -32,7 +32,7 @@ modules:
sources:
- type: git
url: https://git.linuxtv.org/zbar.git
commit: 150df8e19ebf5b13ce25c1e3e0a56446b4389acd
tag: 0.23.93
- type: script
dest-filename: autogen.sh
commands:
Expand Down Expand Up @@ -91,16 +91,16 @@ modules:
builddir: true
sources:
- type: archive
url: https://github.com/GNOME/libsoup/archive/refs/tags/2.74.3.tar.gz
sha256: 2e7a1313c2223c7e70cda90a8c02c679ab2bf3935c07b5bb028a9b5550411b96
url: https://github.com/GNOME/libsoup/archive/refs/tags/3.4.5.tar.gz
sha256: f293f78ad01abfb453c8c71fea81ab5d595c85eb604badce39d12165a10d109c

- name: gstreamer
buildsystem: meson
builddir: true
sources:
- type: git
disable-submodules: true
tag: 1.24.3
tag: 1.24.10
url: https://github.com/GStreamer/gstreamer.git

- name: intltool
Expand All @@ -125,20 +125,12 @@ modules:
tag: v1.8
url: https://github.com/jpirko/libndp.git

# This depend on linux-pam, but don't know how to include it,
# This depend on linux-pam, but don't know how to include it.
# Ref: https://gitlab.gnome.org/GNOME/gnome-control-center/-/tree/main/build-aux/flatpak
- name: polkit
buildsystem: autotools
buildsystem: meson
config-opts:
- --disable-polkitd
- --disable-man-pages
- --disable-introspection
- --disable-examples
- --disable-gtk-doc
- --disable-libelogind
- --disable-libsystemd-login
- --with-systemdsystemunitdir=no
- --with-authdb=dummy
- --with-authfw=none
- -Dauthfw=shadow
rm-configure: true
cleanup:
- /bin/*
Expand All @@ -148,14 +140,9 @@ modules:
- /share/polkit-1
- /lib/polkit-1
sources:
- type: archive
url: https://www.freedesktop.org/software/polkit/releases/polkit-0.116.tar.gz
sha256: 88170c9e711e8db305a12fdb8234fac5706c61969b94e084d0f117d8ec5d34b1
- type: patch
path: flatpak/polkit-build-Add-option-to-build-without-polkitd.patch
- type: file
path: flatpak/polkit-autogen
dest-filename: autogen.sh
- type: git
url: https://gitlab.freedesktop.org/polkit/polkit.git
tag: '124'

- name: udev
config-opts:
Expand Down Expand Up @@ -212,7 +199,7 @@ modules:
sources:
- type: git
url: https://github.com/NetworkManager/NetworkManager.git
tag: 1.44.4
tag: 1.46.4

- name: cobang
builddir: true
Expand Down

0 comments on commit c8db12c

Please sign in to comment.