Skip to content

Commit d913797

Browse files
committed
Start porting to meson python build
- Update ci with latest ubuntu release and build dependencies
1 parent 706e428 commit d913797

File tree

5 files changed

+47
-14
lines changed

5 files changed

+47
-14
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ jobs:
3434

3535
- name: install-deps
3636
run: |
37-
sudo apt install gettext gir1.2-gtk-3.0 python3-build python3-setuptools python3 python3-apt \
38-
python3-aptdaemon.gtk3widgets python3-gi python3-configobj python3-setproctitle
37+
sudo apt install desktop-file-utils gettext gir1.2-gtk-3.0 libglib2.0-bin \
38+
libgtk-4-bin meson python3 python3-build python3-setuptools python3-apt \
39+
python3-aptdaemon.gtk3widgets python3-gi python3-configobj python3-setproctitle \
40+
python3-tldextract
3941
4042
- name: make
41-
run: ./test/test
43+
run: ./test/test -qq

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
include debian/changelog
2-
graft src/LeaptimeManager/ui*
32
global-exclude *.py[cod]
43
graft data*
4+
graft src/LeapTimeManager/ui*

meson.build

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
project('leaptime-manager',
2+
version: run_command('head', '-1', 'debian/changelog', check: true).stdout().split(' ')[1].strip('(').strip(')'),
3+
default_options: ['warning_level=3',
4+
'prefix=/usr',
5+
]
6+
)
7+
8+
application_id = meson.project_name()
9+
i18n = import('i18n')
10+
gnome = import('gnome')
11+
pymod = import('python')
12+
python = pymod.find_installation('python3')
13+
14+
prefix = get_option('prefix')
15+
bindir = get_option('bindir')
16+
datadir = get_option('datadir')
17+
18+
subdir('data')
19+
subdir('po')
20+
subdir('src')
21+
22+
gnome.post_install(
23+
glib_compile_schemas: true,
24+
gtk_update_icon_cache: true,
25+
update_desktop_database: true,
26+
)

pyproject.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
[build-system]
2-
requires = ["setuptools>=61.0"]
3-
build-backend = "setuptools.build_meta"
2+
build-backend = 'mesonpy'
3+
requires = [
4+
"meson >= 1.3.0",
5+
"meson-python >= 0.14.0",
6+
"setuptools>=61.0"
7+
]
48

59
[project]
610
name = "leaptime-manager"
@@ -28,6 +32,7 @@ dependencies = [
2832
"PyGObject",
2933
"python-apt",
3034
"setproctitle",
35+
"tldextract",
3136
]
3237
dynamic = ["version"]
3338

@@ -36,8 +41,8 @@ Homepage = "https://hsbasu.github.io/leaptime-manager"
3641
Repository = "https://www.github.com/mamolinux/leaptime-manager.git"
3742
Issues = "https://www.github.com/mamolinux/leaptime-manager/issues"
3843

39-
[project.scripts]
40-
leaptime-manager = "LeaptimeManager.main:start_LTMCli"
44+
# [project.scripts]
45+
# leaptime-manager = "LeaptimeManager.main:start_LTMCli"
4146

4247
[tool.setuptools.packages.find]
4348
where = ["src"]

test/test

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
2-
3-
set -x
4-
python3 -m build
5-
pip3 install -v ./dist/leaptime_manager-*.whl
6-
leaptime-manager -V
7-
set +x
2+
rm -rf builddir
3+
meson setup -Dprefix=$HOME/.local builddir
4+
meson compile -C builddir --verbose
5+
meson install -C builddir --dry-run
6+
# leaptime-manager -V
7+
# ninja uninstall -C builddir

0 commit comments

Comments
 (0)