]>
Commit | Line | Data |
---|---|---|
9c53b187 JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with doc # do build doc (missing deps) | |
4 | %bcond_with tests # do perform "make test" (missing deps) | |
5 | %bcond_without python2 # CPython 2.x module | |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | Summary: A collection of Python deprecation patterns and strategies that help you collect your technical debt in a non-destructive manner | |
9 | Name: python-debtcollector | |
10 | Version: 1.17.0 | |
bbc0cfd5 | 11 | Release: 6 |
9c53b187 JK |
12 | License: Apache |
13 | Group: Libraries/Python | |
14 | Source0: https://files.pythonhosted.org/packages/source/d/debtcollector/debtcollector-%{version}.tar.gz | |
15 | # Source0-md5: f9d8b024ca72cf50505a48f4691fcdc3 | |
16 | URL: https://pypi.python.org/pypi/debtcollector | |
17 | BuildRequires: rpm-pythonprov | |
18 | BuildRequires: rpmbuild(macros) >= 1.714 | |
19 | %if %{with python2} | |
20 | BuildRequires: python-pbr >= 2.0.0 | |
21 | BuildRequires: python-setuptools | |
22 | %endif | |
23 | %if %{with python3} | |
24 | BuildRequires: python3-pbr >= 2.0.0 | |
25 | BuildRequires: python3-setuptools | |
26 | %endif | |
27 | Requires: python-funcsigs >= 0.4 | |
28 | Requires: python-pbr >= 2.0.0 | |
29 | Requires: python-six >= 1.9.0 | |
30 | Requires: python-wrapt >= 1.7.0 | |
31 | BuildArch: noarch | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | A collection of Python deprecation patterns and strategies that help | |
36 | you collect your technical debt in a non-destructive manner. The goal | |
37 | of this library is to provide well documented developer facing | |
38 | deprecation patterns that start of with a basic set and can expand | |
39 | into a larger set of patterns as time goes on. The desired output of | |
40 | these patterns is to apply the warnings module to emit | |
41 | DeprecationWarning or PendingDeprecationWarning or similar derivative | |
42 | to developers using libraries (or potentially applications) about | |
43 | future deprecations. | |
44 | ||
45 | %package -n python3-debtcollector | |
46 | Summary: A collection of Python deprecation patterns and strategies that help you collect your technical debt in a non-destructive manner | |
47 | Group: Libraries/Python | |
48 | Requires: python3-pbr >= 2.0.0 | |
49 | Requires: python3-six >= 1.9.0 | |
50 | Requires: python3-wrapt >= 1.7.0 | |
51 | ||
52 | %description -n python3-debtcollector | |
53 | A collection of Python deprecation patterns and strategies that help | |
54 | you collect your technical debt in a non-destructive manner. The goal | |
55 | of this library is to provide well documented developer facing | |
56 | deprecation patterns that start of with a basic set and can expand | |
57 | into a larger set of patterns as time goes on. The desired output of | |
58 | these patterns is to apply the warnings module to emit | |
59 | DeprecationWarning or PendingDeprecationWarning or similar derivative | |
60 | to developers using libraries (or potentially applications) about | |
61 | future deprecations. | |
62 | ||
63 | %package apidocs | |
64 | Summary: API documentation for Python debtcollector module | |
65 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona debtcollector | |
66 | Group: Documentation | |
67 | ||
68 | %description apidocs | |
69 | API documentation for Pythona debtcollector module. | |
70 | ||
71 | %description apidocs -l pl.UTF-8 | |
72 | Dokumentacja API modułu Pythona debtcollector. | |
73 | ||
74 | %prep | |
75 | %setup -q -n debtcollector-%{version} | |
76 | ||
77 | %build | |
78 | %if %{with python2} | |
79 | %py_build %{?with_tests:test} | |
80 | %endif | |
81 | ||
82 | %if %{with python3} | |
83 | %py3_build %{?with_tests:test} | |
84 | %endif | |
85 | ||
86 | %if %{with doc} | |
87 | cd doc | |
88 | %{__make} -j1 html | |
89 | rm -rf _build/html/_sources | |
90 | %endif | |
91 | ||
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %if %{with python2} | |
96 | %py_install | |
97 | ||
98 | %py_postclean | |
99 | %endif | |
100 | ||
101 | %if %{with python3} | |
102 | %py3_install | |
103 | ||
104 | # python dependency generator does not support conditionals | |
105 | # remove python2-only dependencies here | |
106 | sed -i -e"/python_version=='2./,+1 d" $RPM_BUILD_ROOT%{py3_sitescriptdir}/debtcollector-%{version}-py*.egg-info/requires.txt | |
107 | %endif | |
108 | ||
109 | %clean | |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
112 | %if %{with python2} | |
113 | %files | |
114 | %defattr(644,root,root,755) | |
115 | %doc AUTHORS ChangeLog README.rst | |
116 | %{py_sitescriptdir}/debtcollector | |
117 | %{py_sitescriptdir}/debtcollector-%{version}-py*.egg-info | |
118 | %endif | |
119 | ||
120 | %if %{with python3} | |
121 | %files -n python3-debtcollector | |
122 | %defattr(644,root,root,755) | |
123 | %doc AUTHORS ChangeLog README.rst | |
124 | %{py3_sitescriptdir}/debtcollector | |
125 | %{py3_sitescriptdir}/debtcollector-%{version}-py*.egg-info | |
126 | %endif | |
127 | ||
128 | %if %{with doc} | |
129 | %files apidocs | |
130 | %defattr(644,root,root,755) | |
131 | %doc doc/_build/html/* | |
132 | %endif |