summaryrefslogtreecommitdiffstats
path: root/komikku/python-retry.spec
blob: e5be6844e816bd043f82c7aab7c83efdc4fafcb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
%global shortname retry

Name:           python-%{shortname}
Version:        0.9.2
Release:        1%{?dist}
Summary:        Easy to use retry decorator

License:        ASL 2.0
URL:            https://github.com/invl/%{shortname}
Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Source1:        tox.ini.fedora

BuildArch:      noarch

%global _description %{expand:
Easy to use retry decorator.

- No external dependency (stdlib only).
- (Optionally) Preserve function signatures (dnf install python3-decorator).
- Original traceback, easy to debug.}

%description    %{_description}

%package        -n python3-%{shortname}
Summary:        %{Summary}
BuildRequires:  git
BuildRequires:  python3-devel
BuildRequires:  python3-mock
BuildRequires:  python3-pbr
BuildRequires:  python3-pytest
BuildRequires:  python3-tox
BuildRequires:  python3-wheel
Recommends:     python3-decorator >= 3.4.2
# There's an error in the requirements.txt, py is not necessary (#19)
%{?python_disable_dependency_generator}
%{?python_provide:%python_provide python3-%{shortname}}

%description    -n python3-%{shortname} %{_description}

%prep
%autosetup      -n %{shortname}-%{version}
# pbr checks for a repo tag in order to generate a version
git init
git add .
git commit -am "Version %{version}"
git tag -am "Version %{version}" %{version}

%build
%py3_build

%install
%py3_install

%check
cp %{SOURCE1} .
tox -c tox.ini.fedora

%files          -n python3-%{shortname}
%license LICENSE
%doc README.rst ChangeLog AUTHORS
%{python3_sitelib}/%{shortname}
%{python3_sitelib}/%{shortname}-%{version}-py*.egg-info

%changelog
* Tue Mar 31 2020 Lyes Saadi <fedora@lyes.eu> - 0.9.2-1
- Initial package.