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
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
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
20 BuildRequires: python-pbr >= 2.0.0
21 BuildRequires: python-setuptools
24 BuildRequires: python3-pbr >= 2.0.0
25 BuildRequires: python3-setuptools
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
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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
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
64 Summary: API documentation for Python debtcollector module
65 Summary(pl.UTF-8): Dokumentacja API modułu Pythona debtcollector
69 API documentation for Pythona debtcollector module.
71 %description apidocs -l pl.UTF-8
72 Dokumentacja API modułu Pythona debtcollector.
75 %setup -q -n debtcollector-%{version}
79 %py_build %{?with_tests:test}
83 %py3_build %{?with_tests:test}
89 rm -rf _build/html/_sources
93 rm -rf $RPM_BUILD_ROOT
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
110 rm -rf $RPM_BUILD_ROOT
114 %defattr(644,root,root,755)
115 %doc AUTHORS ChangeLog README.rst
116 %{py_sitescriptdir}/debtcollector
117 %{py_sitescriptdir}/debtcollector-%{version}-py*.egg-info
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
130 %defattr(644,root,root,755)
131 %doc doc/_build/html/*