File python-lastversion.spec of Package python-lastversion
#
# spec file for package python-lastversion
#
# Copyright (c) 2020 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-lastversion
Version: 1.2.3
Release: 0
Summary: Fetch GitHub project release assets
License: BSD-2-Clause
Group: Development/Languages/Python
URL: https://github.com/dvershinin/lastversion
Source: https://github.com/dvershinin/lastversion/archive/v%{version}.tar.gz#/lastversion-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-CacheControl
Requires: python-appdirs
Requires: python-beautifulsoup4
Requires: python-feedparser
Requires: python-lockfile
Requires: python-packaging
Requires: python-python-dateutil
Requires: python-PyYAML
Requires: python-requests >= 2.6.1
Requires: python-tqdm
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module CacheControl}
BuildRequires: %{python_module beautifulsoup4}
BuildRequires: %{python_module appdirs}
BuildRequires: %{python_module feedparser}
BuildRequires: %{python_module lockfile}
BuildRequires: %{python_module packaging}
BuildRequires: %{python_module pytest >= 4.4.0}
BuildRequires: %{python_module python-dateutil}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module requests >= 2.6.1}
BuildRequires: %{python_module six}
BuildRequires: %{python_module tqdm}
# /SECTION
%python_subpackages
%description
Fetch URLs of a GitHub project's last version release assets.
%prep
%setup -q -n lastversion-%{version}
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/lastversion
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%python_install_alternative lastversion
%postun
%python_uninstall_alternative lastversion
%check
# Mosts tests require network connection
%pytest -k test_version_parse
%files %{python_files}
%doc README.md
%license LICENSE
%python_alternative %{_bindir}/lastversion
%{python_sitelib}/*
%changelog