]> git.pld-linux.org Git - packages/python-zope.deprecation.git/blob - python-zope.deprecation.spec
1eb5f62326732d1e6a3e33b83636aef3ecdcd2df
[packages/python-zope.deprecation.git] / python-zope.deprecation.spec
1 #
2 # Conditional build:
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
6
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}
11 Version:        4.0.2
12 Release:        4
13 License:        ZPL 2.1
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
20 %if %{with python2}
21 BuildRequires:  python >= 1:2.6
22 BuildRequires:  python-setuptools
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3
26 BuildRequires:  python3-setuptools
27 %endif
28 Requires:       python-zope.testing
29 Obsoletes:      Zope-Deprecation
30 Provides:       Zope-Deprecation
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 This package provides a simple function called deprecated(names, reason) to
35 mark deprecated modules, classes, functions, methods and properties.
36
37 %description -l pl.UTF-8
38 Biblioteka odradzająca dla kodu w Pythonie.
39
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
45
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.
49
50 %description -n python3-%{module} -l pl.UTF-8
51 Biblioteka odradzająca dla kodu w Pythonie.
52
53 %prep
54 %setup -q -n zope.deprecation-%{version}
55
56 %build
57 %if %{with python2}
58 %py_build %{?with_tests:test}
59 %endif
60
61 %if %{with python3}
62 %py3_build %{?with_tests:test}
63 %endif
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67
68 %if %{with python2}
69 # py_sitedir needed as there is the rest of zope.* and it contains some platform-specific code
70 %py_install \
71         --install-purelib=%{py_sitedir}
72
73 %py_postclean
74 %endif
75
76 %if %{with python3}
77 # py_sitedir needed as there is the rest of zope.* and it contains some platform-specific code
78 %py3_install \
79         --install-purelib=%{py3_sitedir}
80 %endif
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %if %{with python2}
86 %files
87 %defattr(644,root,root,755)
88 %doc CHANGES.txt
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
93 %endif
94
95 %if %{with python3}
96 %files -n python3-%{module}
97 %defattr(644,root,root,755)
98 %doc CHANGES.txt
99 %{py3_sitedir}/zope/deprecation
100 %{py3_sitedir}/zope.deprecation-*.egg-info
101 %{py3_sitedir}/zope.deprecation-*-nspkg.pth
102 %endif
This page took 0.04454 seconds and 2 git commands to generate.