File audible-cli.spec of Package audible-cli

#
# spec file for package audible-cli
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-audible-cli
Version:        0.2.4
Release:        0
Summary:        Command line interface (cli) for the audible package
License:        AGPL-3
URL:            https://github.com/mkb79/audible-cli
Source:         https://files.pythonhosted.org/packages/source/a/audible-cli/audible-cli-%{version}.tar.gz
BuildRequires:  %{python_module Pillow}
BuildRequires:  %{python_module aiofiles}
BuildRequires:  %{python_module audible == 0.7.2}
BuildRequires:  %{python_module click >= 8}
BuildRequires:  %{python_module httpx >= 0.20.0}
BuildRequires:  %{python_module packaging}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module tabulate}
BuildRequires:  %{python_module toml}
BuildRequires:  %{python_module tqdm}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-Pillow
Requires:       python-aiofiles
Requires:       python-audible = 0.7.2
Requires:       python-click >= 8
Requires:       python-httpx >= 0.20.0
Requires:       python-packaging
Requires:       python-tabulate
Requires:       python-toml
Requires:       python-tqdm
Suggests:       python-colorama
Suggests:       python-pyinstaller
BuildArch:      noarch
%python_subpackages

%description
A command line interface for audible package. With the cli you can download your Audible books, cover, chapter files.

%prep
%setup -q -n audible-cli-%{version}

%build
%python_build

%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/audible
%python_clone -a %{buildroot}%{_bindir}/audible-quickstart
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%post
%python_install_alternative audible audible-quickstart

%postun
%python_uninstall_alternative audible

%files %{python_files}
%doc README.md
%license LICENSE
%python_alternative %{_bindir}/audible
%python_alternative %{_bindir}/audible-quickstart
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by