]> git.pld-linux.org Git - packages/python-zope.deprecation.git/blob - python-zope.deprecation.spec
- updated to 4.4.0, added apidocs
[packages/python-zope.deprecation.git] / python-zope.deprecation.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define module  zope.deprecation
9 Summary:        Deprecation library for Python code
10 Summary(pl.UTF-8):      Biblioteka odradzająca dla kodu w Pythonie
11 Name:           python-%{module}
12 Version:        4.4.0
13 Release:        1
14 License:        ZPL v2.1
15 Group:          Libraries/Python
16 Source0:        https://files.pythonhosted.org/packages/source/z/zope.deprecation/zope.deprecation-%{version}.tar.gz
17 # Source0-md5:  6915a92473e2658b3954f8490938455c
18 URL:            https://www.zope.dev/
19 %if %{with python2}
20 BuildRequires:  python >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-zope.testrunner
24 %endif
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3 >= 1:3.4
28 BuildRequires:  python3-setuptools
29 %if %{with tests}
30 BuildRequires:  python3-zope.testrunner
31 %endif
32 %endif
33 BuildRequires:  rpm-pythonprov
34 BuildRequires:  rpmbuild(macros) >= 1.714
35 %if %{with doc}
36 BuildRequires:  sphinx-pdg
37 %endif
38 Requires:       python-modules >= 1:2.7
39 Provides:       Zope-Deprecation
40 Obsoletes:      Zope-Deprecation < 4.1.0
41 BuildArch:      noarch
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 This package provides a simple function called deprecated(names,
46 reason) to mark deprecated modules, classes, functions, methods and
47 properties.
48
49 %description -l pl.UTF-8
50 Ten pakiet udostępnia prostą funkcję o nazwie deprecated(names,
51 reason), służącą do oznaczania przestarzałych modułów, klas, funkcji,
52 metod i własności.
53
54 %package -n python3-%{module}
55 Summary:        Deprecation library for Python code
56 Summary(pl.UTF-8):      Biblioteka odradzająca dla kodu w Pythonie
57 Group:          Libraries/Python
58 Requires:       python3-modules >= 1:3.4
59
60 %description -n python3-%{module}
61 This package provides a simple function called deprecated(names,
62 reason) to mark deprecated modules, classes, functions, methods and
63 properties.
64
65 %description -n python3-%{module} -l pl.UTF-8
66 Ten pakiet udostępnia prostą funkcję o nazwie deprecated(names,
67 reason), służącą do oznaczania przestarzałych modułów, klas, funkcji,
68 metod i własności.
69
70 %package apidocs
71 Summary:        API documentation for Python zope.deprecation module
72 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona zope.deprecation
73 Group:          Documentation
74
75 %description apidocs
76 API documentation for Python zope.deprecation module.
77
78 %description apidocs -l pl.UTF-8
79 Dokumentacja API modułu Pythona zope.deprecation.
80
81 %prep
82 %setup -q -n zope.deprecation-%{version}
83
84 %build
85 %if %{with python2}
86 %py_build %{?with_tests:test}
87 %endif
88
89 %if %{with python3}
90 %py3_build %{?with_tests:test}
91 %endif
92
93 %if %{with doc}
94 PYTHONPATH=$(pwd)/src \
95 %{__make} -C docs html
96 %endif
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100
101 %if %{with python2}
102 %py_install
103
104 %py_postclean
105 %endif
106
107 %if %{with python3}
108 %py3_install
109 %endif
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %if %{with python2}
115 %files
116 %defattr(644,root,root,755)
117 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
118 %{py_sitescriptdir}/zope/deprecation
119 %{py_sitescriptdir}/zope.deprecation-*.egg-info
120 %{py_sitescriptdir}/zope.deprecation-*-nspkg.pth
121 %endif
122
123 %if %{with python3}
124 %files -n python3-%{module}
125 %defattr(644,root,root,755)
126 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
127 %{py3_sitescriptdir}/zope/deprecation
128 %{py3_sitescriptdir}/zope.deprecation-*.egg-info
129 %{py3_sitescriptdir}/zope.deprecation-*-nspkg.pth
130 %endif
131
132 %if %{with doc}
133 %files apidocs
134 %defattr(644,root,root,755)
135 %doc docs/_build/html/{_static,*.html,*.js}
136 %endif
This page took 0.073667 seconds and 3 git commands to generate.