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