diff --git a/linux/debian/control b/linux/debian/control index 30cd2271b7..09e9f89086 100644 --- a/linux/debian/control +++ b/linux/debian/control @@ -25,6 +25,7 @@ Build-Depends: perl, pkgconf, python3-all (>= 3.5), + python3-build, python3-dbus, python3-fonttools, python3-gi, @@ -39,6 +40,7 @@ Build-Depends: python3-requests, python3-sentry-sdk (>= 1.1), python3-setuptools, + python3-venv, python3-xdg, xserver-xephyr, xvfb, diff --git a/linux/keyman-config/Makefile b/linux/keyman-config/Makefile index d36bf16a0f..ad5b0d2c53 100644 --- a/linux/keyman-config/Makefile +++ b/linux/keyman-config/Makefile @@ -15,11 +15,13 @@ clean: check: ./build.sh test -devdist: version - python3 setup.py egg_info -b.`TZ=UTC git log -1 --pretty=format:%cd --date=format-local:%Y%m%d%H%M` sdist - dist: clean version - python3 setup.py sdist + # TODO: remove this if when we no longer support Ubuntu 22.04 Jammy + if dpkg --compare-versions "$(lsb_release -r -s)" lt 24.04; then \ + python3 setup.py sdist ; \ + else \ + python3 -m build --outdir build --sdist ; \ + fi deb: dist @VERSION=$(shell echo `basename dist/*.gz .tar.gz|cut -d "-" -f2` > /tmp/keyman_version) diff --git a/linux/keyman-config/build.sh b/linux/keyman-config/build.sh index f121084cc3..b4b4bd0377 100755 --- a/linux/keyman-config/build.sh +++ b/linux/keyman-config/build.sh @@ -83,7 +83,14 @@ build_action() { builder_echo "Building man and help pages" build_man_and_help_pages builder_echo "Building keyman-config" - python3 setup.py build + # we use `dpkg --compare-versions` to compare the current Ubuntu version + if dpkg --compare-versions "$(lsb_release -r -s)" lt 24.04; then + # Ubuntu 22.04 Jammy has a buggy version of python3-build which doesn't work + # TODO: remove once we drop support for Ubuntu 22.04 Jammy + python3 setup.py build + else + python3 -m build --outdir build . + fi } test_action() {