]>
Commit | Line | Data |
---|---|---|
32071a26 JP |
1 | %bcond_without python2 # CPython 2.x module |
2 | %bcond_without python3 # CPython 3.x module | |
3 | ||
4 | %define module click_log | |
5 | %define pypi_name click-log | |
6 | Summary: Integrates logging with click | |
7 | Name: python-click-log | |
8 | Version: 0.3.2 | |
5e866d11 | 9 | Release: 5 |
32071a26 JP |
10 | License: MIT |
11 | Group: Libraries/Python | |
12 | #Source0Download: https://pypi.org/simple/click-log/ | |
13 | Source0: https://files.pythonhosted.org/packages/source/c/click-log/%{pypi_name}-%{version}.tar.gz | |
14 | # Source0-md5: 5c9244f0fa5b3557220396e32d32daf2 | |
15 | URL: https://pypi.org/project/click-log/ | |
16 | %if %{with python2} | |
17 | BuildRequires: python-modules >= 1:2.7 | |
18 | BuildRequires: python-setuptools | |
19 | %endif | |
20 | %if %{with python3} | |
21 | BuildRequires: python3-modules >= 1:3.3 | |
22 | BuildRequires: python3-setuptools | |
23 | %endif | |
24 | BuildRequires: rpm-pythonprov | |
25 | BuildRequires: rpmbuild(macros) >= 1.714 | |
26 | Requires: python-modules >= 1:2.7 | |
27 | BuildArch: noarch | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
31 | Integrates logging with click. | |
32 | ||
33 | %package -n python3-click-log | |
34 | Summary: Integrates logging with click | |
35 | Group: Libraries/Python | |
36 | Requires: python3-modules >= 1:3.3 | |
37 | ||
38 | %description -n python3-click-log | |
39 | Integrates logging with click. | |
40 | ||
41 | %prep | |
42 | %setup -q -n %{pypi_name}-%{version} | |
43 | ||
44 | %build | |
45 | %if %{with python2} | |
46 | %py_build | |
47 | %endif | |
48 | ||
49 | %if %{with python3} | |
50 | %py3_build | |
51 | %endif | |
52 | ||
53 | %install | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %if %{with python2} | |
57 | %py_install | |
58 | ||
59 | %py_postclean | |
60 | %endif | |
61 | ||
62 | %if %{with python3} | |
63 | %py3_install | |
64 | %endif | |
65 | ||
66 | %clean | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %if %{with python2} | |
70 | %files | |
71 | %defattr(644,root,root,755) | |
72 | %doc README.rst | |
73 | %{py_sitescriptdir}/%{module} | |
74 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
75 | %endif | |
76 | ||
77 | %if %{with python3} | |
78 | %files -n python3-click-log | |
79 | %defattr(644,root,root,755) | |
80 | %doc README.rst | |
81 | %{py3_sitescriptdir}/%{module} | |
82 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
83 | %endif |