Skip to content

Commit

Permalink
[Dependencies] Added message about KiBot repo
Browse files Browse the repository at this point in the history
For packages that aren't official
  • Loading branch information
set-soft committed Jan 24, 2024
1 parent ec3fec2 commit 2ff4035
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions kibot/dep_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,8 @@ def check_tool_dep_get_ver(context, dep, fatal=False):
do_log_err('Download page: '+dep.url_down, fatal)
if dep.deb_package:
do_log_err('Debian package: '+dep.deb_package, fatal)
if not dep.in_debian:
do_log_err('- This is not an official package, use KiBot repo (https://github.com/set-soft/debian)', fatal)
if dep.extra_deb:
do_log_err('- Recommended extra Debian packages: '+' '.join(dep.extra_deb), fatal)
if dep.arch:
Expand Down Expand Up @@ -912,10 +914,11 @@ def __init__(self, output, name, url=None, url_down=None, is_python=False, deb=N
self.name = name
# Name of the .deb
if deb is None:
if is_python:
self.deb_package = 'python3-'+name.lower()
else:
if not is_python:
self.deb_package = name.lower()
# We don't use it for python modules:
# else:
# self.deb_package = 'python3-'+name.lower()
else:
self.deb_package = deb
self.is_python = is_python
Expand Down
2 changes: 1 addition & 1 deletion tests/test_plot/test_dep_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ def test_check_tool_dep_get_ver_1(test_dir, caplog, monkeypatch):
dep = """
- name: FooBar
version: 1.3.0.4
debian: foobar-debian
extra_deb: ['foobar-extra-debian', 'deb2']
arch: foobar-arch (AUR)
extra_arch: ['foobar-extra-arch', 'aur2']
Expand All @@ -228,6 +227,7 @@ def test_check_tool_dep_get_ver_1(test_dir, caplog, monkeypatch):
assert "Recommended extra Arch packages: foobar-extra-arch aur2" in caplog.text
assert "Recommended extra Debian packages: foobar-extra-debian deb2" in caplog.text
assert "Used to do this and this (v1.3.0.4)" in caplog.text
assert "This is not an official package" in caplog.text
assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.value.code == MISSING_TOOL

Expand Down

0 comments on commit 2ff4035

Please sign in to comment.