Skip to content
Snippets Groups Projects
Commit 0725db61 authored by Jakub Ružička's avatar Jakub Ružička
Browse files

distro: support both pyproject and setuptools

parent fca9b477
No related branches found
No related tags found
1 merge request!149distro: Improve Debian packaging
......@@ -4,12 +4,16 @@ Priority: optional
Maintainer: Jakub Ružička <jakub.ruzicka@nic.cz>
Build-Depends:
debhelper (>= 12),
{%- if distro.match('debian <= 11', 'ubuntu <= 22.04') %}
dh-python,
python3,
python3-setuptools,
{%- else %}
dh-sequence-python3,
pybuild-plugin-pyproject,
python3-hatchling,
{%- endif %}
python3,
python3-pytest,
Build-Depends-Indep:
python3-blessings
Standards-Version: 4.6.1
Homepage: https://gitlab.nic.cz/packaging/apkg
......@@ -17,10 +21,6 @@ Package: python3-apkg
Architecture: all
Provides: apkg
Depends:
python3-blessings,
python3-bs4,
python3-click,
python3-jinja2,
${misc:Depends},
${python3:Depends},
Description: cross-distro packaging automation tool
......
......@@ -3,5 +3,10 @@
%:
dh $@ --with python3 --buildsystem=pybuild
override_dh_auto_build:
# blessed is in install_requires for PyPI, but it's optional for colors
sed -i '/blessed/d' setup.cfg
dh_auto_build
override_dh_auto_test:
python3 -m pytest
......@@ -108,7 +108,7 @@ def test_apkg_srcpkg(repo_path, capsys):
def test_apkg_build(repo_path, capsys):
with cd(repo_path):
assert apkg('build') == 0
assert apkg('build', '-b') == 0
out, _ = capsys.readouterr()
# at least one package should be printed
assert re.match(r"pkg/pkgs/\S+/apkg\S+", out)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment