Skip to content

Commit

Permalink
Update debian and python packaging
Browse files Browse the repository at this point in the history
- Use debian pyproject build system
- Remove unsed files related to packaging
- Use both setup.cfg and pyproject.toml
  for now so that debian uses python build
  module.
- Add pybuild-plugin-pyproject as build
  dependency
  • Loading branch information
hsbasu committed Mar 18, 2024
1 parent 059c0dd commit 53ca2ae
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 71 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
- name: install-deps
run: |
sudo apt-get update -qq
sudo apt install -y build-essential debhelper devscripts \
dh-python gettext python3 python3-setuptools
sudo apt install -y build-essential debhelper devscripts dh-python \
gettext pybuild-plugin-pyproject python3 python3-setuptools
- name: build-deb
run: |
Expand Down
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Build-Depends: debhelper-compat (= 13),
dh-python,
gettext,
libglib2.0-bin,
pybuild-plugin-pyproject,
python3,
python3-setuptools
Standards-Version: 4.6.0
Expand Down
1 change: 0 additions & 1 deletion debian/leaptime-manager.install

This file was deleted.

2 changes: 1 addition & 1 deletion debian/py3dist-overrides
Original file line number Diff line number Diff line change
@@ -1 +1 @@
aptdaemon python3-aptdaemon
aptdaemon python3-aptdaemon
7 changes: 2 additions & 5 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# output every command that modifies files on the build system.
# export DH_VERBOSE = 1

export PYBUILD_NAME=LeaptimeManager
export PYBUILD_INSTALL_ARGS_python3=--install-scripts=usr/bin
export PYBUILD_SYSTEM=pyproject
export PYBUILD_NAME=leaptime-manager

%:
dh $@ --with python3 --buildsystem=pybuild
Expand All @@ -27,6 +27,3 @@ override_dh_install:
dh_install -O--buildsystem=pybuild
rm -f debian/leaptime-manager/usr/share/glib-2.0/schemas/gschemas.compiled
rm -rf debian/leaptime-manager/usr/lib/python*/dist-packages/LeaptimeManager/__pycache__

override_dh_auto_install:
dh_auto_install --destdir=$(CURDIR)/$(DEB_SOURCE)
47 changes: 46 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "leaptime-manager"
authors = [
{name = "Himadri Sekhar Basu", email = "[email protected]"},
]
description = "All-in-one GUI based backup manager"
readme = {file = "README.md", content-type = "text/markdown"}
license = {file = "LICENSE"}
requires-python = ">=3.6"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: X11 Applications :: GTK",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved",
" :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Administration",
]
dependencies = [
"aptdaemon",
"configobj",
"PyGObject",
"python-apt",
"setproctitle",
]
dynamic = ["version"]

[project.urls]
Homepage = "https://hsbasu.github.io/leaptime-manager"
Repository = "https://www.github.com/mamolinux/leaptime-manager.git"
Issues = "https://www.github.com/mamolinux/leaptime-manager/issues"

[project.scripts]
leaptime-manager = "LeaptimeManager.main:start_LTMCli"

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

[tool.setuptools.package-data]
"*" = ["*VERSION", "*.ui"]

[tool.setuptools.dynamic]
version = {file = "src/LeaptimeManager/VERSION"}
53 changes: 0 additions & 53 deletions pyproject.toml.new

This file was deleted.

8 changes: 0 additions & 8 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,3 @@ where = src
[options.entry_points]
console_scripts =
leaptime-manager = LeaptimeManager.main:start_LTMCli

[build_i18n]
domain=leaptime-manager
desktop_files=[("share/applications", ("data/leaptime-manager.desktop.in",
))]
schemas_files=[("share/glib-2.0/schemas",
("data/org.mamolinux.leaptime-manager.gschema.xml.in",))
]

0 comments on commit 53ca2ae

Please sign in to comment.