3 %bcond_without tests # do not perform "make test"
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 %define module zope.deprecation
8 Summary: Deprecation library for Python code
9 Summary(pl.UTF-8): Biblioteka odradzająca dla kodu w Pythonie
10 Name: python-%{module}
14 Group: Libraries/Python
15 Source0: http://pypi.python.org/packages/source/z/zope.deprecation/zope.deprecation-%{version}.tar.gz
16 # Source0-md5: 5f8cecce85f2783f9e020f1288e908fd
17 URL: http://docs.zope.org/zope.deprecation/
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.710
21 BuildRequires: python >= 1:2.6
22 BuildRequires: python-setuptools
25 BuildRequires: python3
26 BuildRequires: python3-setuptools
28 Requires: python-zope.testing
29 Obsoletes: Zope-Deprecation
30 Provides: Zope-Deprecation
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 This package provides a simple function called deprecated(names, reason) to
35 mark deprecated modules, classes, functions, methods and properties.
37 %description -l pl.UTF-8
38 Biblioteka odradzająca dla kodu w Pythonie.
40 %package -n python3-%{module}
41 Summary: Deprecation library for Python code
42 Summary(pl.UTF-8): Biblioteka odradzająca dla kodu w Pythonie
43 Group: Libraries/Python
44 Requires: python3-zope.testing
46 %description -n python3-%{module}
47 This package provides a simple function called deprecated(names, reason) to
48 mark deprecated modules, classes, functions, methods and properties.
50 %description -n python3-%{module} -l pl.UTF-8
51 Biblioteka odradzająca dla kodu w Pythonie.
54 %setup -q -n zope.deprecation-%{version}
58 %py_build %{?with_tests:test}
62 %py3_build %{?with_tests:test}
66 rm -rf $RPM_BUILD_ROOT
69 # py_sitedir needed as there is the rest of zope.* and it contains some platform-specific code
71 --install-purelib=%{py_sitedir}
77 # py_sitedir needed as there is the rest of zope.* and it contains some platform-specific code
79 --install-purelib=%{py3_sitedir}
83 rm -rf $RPM_BUILD_ROOT
87 %defattr(644,root,root,755)
89 %dir %{py_sitedir}/zope/deprecation
90 %{py_sitedir}/zope/deprecation/*.py[co]
91 %{py_sitedir}/zope.deprecation-*.egg-info
92 %{py_sitedir}/zope.deprecation-*-nspkg.pth
96 %files -n python3-%{module}
97 %defattr(644,root,root,755)
99 %{py3_sitedir}/zope/deprecation
100 %{py3_sitedir}/zope.deprecation-*.egg-info
101 %{py3_sitedir}/zope.deprecation-*-nspkg.pth