]> git.pld-linux.org Git - SPECS.git/blob - python-zope.exceptions.spec
SPECS updated Sun 1 Aug 15:50:02 CEST 2021
[SPECS.git] / python-zope.exceptions.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_with     tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         _enable_debug_packages  0
9
10 %define module  zope.exceptions
11 Summary:        Zope Exceptions
12 Summary(pl.UTF-8):      Zope Exceptions - wyjątki Zope
13 Name:           python-%{module}
14 Version:        4.3
15 Release:        3
16 License:        ZPL v2.1
17 Group:          Libraries/Python
18 #Source0Download: https://pypi.org/simple/zope-exceptions/
19 Source0:        https://files.pythonhosted.org/packages/source/z/zope.exceptions/zope.exceptions-%{version}.tar.gz
20 # Source0-md5:  fac94f92c787cf9870e9e3fdfe247aa4
21 URL:            https://www.zope.org/
22 %if %{with python2}
23 BuildRequires:  python >= 1:2.7
24 BuildRequires:  python-setuptools
25 %if %{with tests}
26 BuildRequires:  python-zope.interface
27 BuildRequires:  python-zope.testrunner
28 %endif
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3 >= 1:3.4
32 BuildRequires:  python3-setuptools
33 %if %{with tests}
34 BuildRequires:  python3-zope.interface
35 BuildRequires:  python3-zope.testrunner
36 %endif
37 %endif
38 BuildRequires:  rpm-pythonprov
39 BuildRequires:  rpmbuild(macros) >= 1.714
40 %if %{with doc}
41 BuildRequires:  sphinx-pdg-3
42 BuildRequires:  python3-repoze.sphinx.autointerface
43 %endif
44 Requires:       python-modules >= 1:2.7
45 Requires:       python-zope-base
46 Obsoletes:      Zope-Exceptions
47 BuildArch:      noarch
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %description
51 This package contains exception exceptions and implementations which
52 are so general purpose that they don't belong in Zope
53 application-specific packages.
54
55 %description -l pl.UTF-8
56 Ten pakiet zawiera wyjątki oraz implementacje wyjątków, mających na
57 tyle ogólne zastosowanie, że nie należą do żadnego z pakietów Zope
58 specyficznych dla aplikacji.
59
60 %package -n python3-%{module}
61 Summary:        Zope Exceptions
62 Summary(pl.UTF-8):      Zope Exceptions - wyjątki Zope
63 Group:          Libraries/Python
64 Requires:       python3-modules >= 1:3.4
65 Requires:       python3-zope-base
66
67 %description -n python3-%{module}
68 This package contains exception exceptions and implementations which
69 are so general purpose that they don't belong in Zope
70 application-specific packages.
71
72 %description -n python3-%{module} -l pl.UTF-8
73 Ten pakiet zawiera wyjątki oraz implementacje wyjątków, mających na
74 tyle ogólne zastosowanie, że nie należą do żadnego z pakietów Zope
75 specyficznych dla aplikacji.
76
77 %package apidocs
78 Summary:        API documentation for Python zope.exceptions module
79 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona zope.exceptions
80 Group:          Documentation
81
82 %description apidocs
83 API documentation for Python zope.exceptions module.
84
85 %description apidocs -l pl.UTF-8
86 Dokumentacja API modułu Pythona zope.exceptions.
87
88 %prep
89 %setup -q -n zope.exceptions-%{version}
90
91 %build
92 %if %{with python2}
93 %py_build
94
95 %if %{with tests}
96 %{__python} -m zope.testrunner --test-path=src
97 %endif
98 %endif
99
100 %if %{with python3}
101 %py3_build
102
103 %if %{with tests}
104 %{__python3} -m zope.testrunner --test-path=src
105 %endif
106 %endif
107
108 %if %{with doc}
109 %{__make} -C docs html \
110         SPHINXBUILD=sphinx-build
111 %endif
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115
116 %if %{with python2}
117 %py_install \
118         --install-purelib=%{py_sitescriptdir}
119 %py_postclean
120 %endif
121
122 %if %{with python3}
123 %py3_install \
124         --install-purelib=%{py3_sitescriptdir}
125 %endif
126
127 %clean
128 rm -rf $RPM_BUILD_ROOT
129
130 %if %{with python2}
131 %files
132 %defattr(644,root,root,755)
133 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
134 %{py_sitescriptdir}/zope/exceptions
135 %{py_sitescriptdir}/zope.exceptions-%{version}-py*.egg-info
136 %{py_sitescriptdir}/zope.exceptions-%{version}-py*-nspkg.pth
137 %endif
138
139 %if %{with python3}
140 %files -n python3-%{module}
141 %defattr(644,root,root,755)
142 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
143 %{py3_sitescriptdir}/zope/exceptions
144 %{py3_sitescriptdir}/zope.exceptions-%{version}-py*.egg-info
145 %{py3_sitescriptdir}/zope.exceptions-%{version}-py*-nspkg.pth
146 %endif
147
148 %if %{with doc}
149 %defattr(644,root,root,755)
150 %files apidocs
151 %doc docs/_build/html/{_static,*.html,*.js}
152 %endif
This page took 1.2044 seconds and 3 git commands to generate.