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 _enable_debug_packages 0
9 %define module zope.deprecation
10 Summary: Deprecation library for Python code
11 Summary(pl.UTF-8): Biblioteka odradzająca dla kodu w Pythonie
12 Name: python-%{module}
16 Group: Libraries/Python
17 Source0: http://pypi.python.org/packages/source/z/zope.deprecation/zope.deprecation-%{version}.tar.gz
18 # Source0-md5: 5f8cecce85f2783f9e020f1288e908fd
19 URL: http://docs.zope.org/zope.deprecation/
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.710
23 BuildRequires: python >= 1:2.6
24 BuildRequires: python-setuptools
27 BuildRequires: python3
28 BuildRequires: python3-setuptools
30 Requires: python-zope.testing
31 Obsoletes: Zope-Deprecation
32 Provides: Zope-Deprecation
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 This package provides a simple function called deprecated(names, reason) to
38 mark deprecated modules, classes, functions, methods and properties.
40 %description -l pl.UTF-8
41 Biblioteka odradzająca dla kodu w Pythonie.
43 %package -n python3-%{module}
44 Summary: Deprecation library for Python code
45 Summary(pl.UTF-8): Biblioteka odradzająca dla kodu w Pythonie
46 Group: Libraries/Python
47 Requires: python3-zope.testing
49 %description -n python3-%{module}
50 This package provides a simple function called deprecated(names, reason) to
51 mark deprecated modules, classes, functions, methods and properties.
53 %description -n python3-%{module} -l pl.UTF-8
54 Biblioteka odradzająca dla kodu w Pythonie.
57 %setup -q -n zope.deprecation-%{version}
61 %py_build %{?with_tests:test}
65 %py3_build %{?with_tests:test}
69 rm -rf $RPM_BUILD_ROOT
72 # py_sitescriptdir needed as there is the rest of zope.* and it contains some platform-specific code
74 --install-purelib=%{py_sitescriptdir}
80 # py_sitescriptdir needed as there is the rest of zope.* and it contains some platform-specific code
82 --install-purelib=%{py3_sitescriptdir}
86 rm -rf $RPM_BUILD_ROOT
90 %defattr(644,root,root,755)
92 %dir %{py_sitescriptdir}/zope/deprecation
93 %{py_sitescriptdir}/zope/deprecation/*.py[co]
94 %{py_sitescriptdir}/zope.deprecation-*.egg-info
95 %{py_sitescriptdir}/zope.deprecation-*-nspkg.pth
99 %files -n python3-%{module}
100 %defattr(644,root,root,755)
102 %{py3_sitescriptdir}/zope/deprecation
103 %{py3_sitescriptdir}/zope.deprecation-*.egg-info
104 %{py3_sitescriptdir}/zope.deprecation-*-nspkg.pth