]> git.pld-linux.org Git - packages/python-deprecation.git/blame - python-deprecation.spec
- release 4 (by relup.sh)
[packages/python-deprecation.git] / python-deprecation.spec
CommitLineData
c991a984
JK
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
6Summary: A library to handle automated deprecations
7Name: python-deprecation
8Version: 1.0.1
2654b0da 9Release: 4
c991a984
JK
10License: Apache
11Group: Libraries/Python
12Source0: https://pypi.python.org/packages/8c/e3/e5c66eba8fa2fd567065fa70ada98b990f449f74fb812b408fa7aafe82c9/deprecation-%{version}.tar.gz
13# Source0-md5: d8a318c66d442dc4b900e070267ed9aa
14URL: https://pypi.python.org/pypi/deprecation
15BuildRequires: rpm-pythonprov
16BuildRequires: rpmbuild(macros) >= 1.714
17%if %{with python2}
18BuildRequires: python-setuptools
19%endif
20%if %{with python3}
21BuildRequires: python3-setuptools
22%endif
23Requires: python-modules
24BuildArch: noarch
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
28The deprecation library provides a deprecated decorator and a
29fail_if_not_removed decorator for your tests. Together, the two enable
30the automation of several things:
31
32- The docstring of a deprecated method gets the deprecation details
33 appended to the end of it. If you generate your API docs direct from
34 your source, you don't need to worry about writing your own
35 notification. You also don't need to worry about forgetting to write
36 it. It's done for you.
37- Rather than having code live on forever because you only deprecated
38 it but never actually moved on from it, you can have your tests tell
39 you when it's time to remove the code. The @deprecated decorator can
40 be told when it's time to entirely remove the code, which causes
41 @fail_if_not_removed to raise an AssertionError, causing either your
42 unittest or py.test tests to fail.
43
44%package -n python3-deprecation
45Summary: A library to handle automated deprecations
46Group: Libraries/Python
47Requires: python3-modules
48
49%description -n python3-deprecation
50The deprecation library provides a deprecated decorator and a
51fail_if_not_removed decorator for your tests. Together, the two enable
52the automation of several things:
53
54- The docstring of a deprecated method gets the deprecation details
55 appended to the end of it. If you generate your API docs direct from
56 your source, you don't need to worry about writing your own
57 notification. You also don't need to worry about forgetting to write
58 it. It's done for you.
59- Rather than having code live on forever because you only deprecated
60 it but never actually moved on from it, you can have your tests tell
61 you when it's time to remove the code. The @deprecated decorator can
62 be told when it's time to entirely remove the code, which causes
63 @fail_if_not_removed to raise an AssertionError, causing either your
64 unittest or py.test tests to fail.
65
66%prep
67%setup -q -n deprecation-%{version}
68
69%build
70%if %{with python2}
71%py_build
72%endif
73
74%if %{with python3}
75%py3_build
76%endif
77
78%install
79rm -rf $RPM_BUILD_ROOT
80
81%if %{with python2}
82%py_install
83
84%py_postclean
85%endif
86
87%if %{with python3}
88%py3_install
89%endif
90
91%clean
92rm -rf $RPM_BUILD_ROOT
93
94%if %{with python2}
95%files
96%defattr(644,root,root,755)
97%doc README.rst
98%{py_sitescriptdir}/deprecation.py[co]
99%{py_sitescriptdir}/deprecation-%{version}-py*.egg-info
100%endif
101
102%if %{with python3}
103%files -n python3-deprecation
104%defattr(644,root,root,755)
105%doc README.rst
106%{py3_sitescriptdir}/deprecation.py
107%{py3_sitescriptdir}/__pycache__/*
108%{py3_sitescriptdir}/deprecation-%{version}-py*.egg-info
109%endif
This page took 0.131399 seconds and 4 git commands to generate.