-
Notifications
You must be signed in to change notification settings - Fork 2
/
python-archive-tools.spec
75 lines (60 loc) · 1.62 KB
/
python-archive-tools.spec
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
67
68
69
70
71
72
73
74
75
%bcond_without tests
%global distname archive-tools
%if 0%{?sle_version} >= 150500
%global pythons python3 python311
%else
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
%endif
Name: python-%{distname}
Version: $version
Release: 0
Summary: $description
License: Apache-2.0
URL: $url
Group: Development/Libraries/Python
Source: https://github.com/RKrahl/archive-tools/releases/download/%{version}/%{distname}-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.6}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with tests}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module lark-parser}
BuildRequires: %{python_module distutils-pytest}
BuildRequires: %{python_module packaging}
BuildRequires: %{python_module pytest >= 3.0}
BuildRequires: %{python_module pytest-dependency >= 0.2}
BuildRequires: %{python_module python-dateutil}
%endif
Requires: python-PyYAML
Requires: python-lark-parser
Requires: python-packaging
Recommends: python-IMAPClient
Recommends: python-python-dateutil
BuildArch: noarch
%python_subpackages
%description
$long_description
%prep
%setup -q -n %{distname}-%{version}
%build
%python_build
%install
%python_install
for f in `ls %{buildroot}%{_bindir}`
do
mv %{buildroot}%{_bindir}/$$f %{buildroot}%{_bindir}/$${f%%.py}
done
%fdupes %{buildroot}%{python_sitelib}
%if %{with tests}
%check
%python_expand $$python setup.py test
%endif
%files %{python_files}
%license LICENSE.txt
%doc README.rst CHANGES.rst
%config(noreplace) %{_sysconfdir}/backup.cfg
%{python_sitelib}/*
%{_bindir}/*
%changelog