]> git.pld-linux.org Git - packages/python-zope.interface.git/blob - python-zope.interface.spec
- updated to 5.5.2
[packages/python-zope.interface.git] / python-zope.interface.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6 %bcond_without  tests   # unit tests
7
8 %define         module  zope.interface
9 Summary:        Python 'interface' concept implementation
10 Summary(pl.UTF-8):      Implementacja interfejsów dla języka Python
11 Name:           python-%{module}
12 # keep 5.x here for python2 support
13 Version:        5.5.2
14 Release:        1
15 License:        ZPL v2.1
16 Group:          Libraries/Python
17 #Source0Download: https://pypi.org/simple/zope.interface/
18 Source0:        https://files.pythonhosted.org/packages/source/z/zope.interface/zope.interface-%{version}.tar.gz
19 # Source0-md5:  5a383d71156ce6f89f59a86d957a8d65
20 URL:            https://zopeinterface.readthedocs.io/
21 %if %{with python2}
22 BuildRequires:  python >= 1:2.7
23 BuildRequires:  python-devel >= 1:2.7
24 BuildRequires:  python-setuptools
25 %if %{with tests}
26 BuildRequires:  python-coverage >= 5.0.3
27 BuildRequires:  python-zope.event
28 BuildRequires:  python-zope.testing
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3 >= 1:3.5
33 BuildRequires:  python3-devel >= 1:3.5
34 BuildRequires:  python3-setuptools
35 %if %{with tests}
36 BuildRequires:  python3-coverage >= 5.0.3
37 BuildRequires:  python3-zope.event
38 BuildRequires:  python3-zope.testing
39 %endif
40 %endif
41 BuildRequires:  rpm-pythonprov
42 BuildRequires:  rpmbuild(macros) >= 1.714
43 %if %{with doc}
44 BuildRequires:  python3-repoze.sphinx.autointerface
45 BuildRequires:  sphinx-pdg-3
46 %endif
47 Requires:       python-modules >= 1:2.7
48 Requires:       python-zope-base
49 Provides:       ZopeInterface
50 Provides:       Zope-Interface
51 Obsoletes:      ZopeInterface < 3.4.0
52 Obsoletes:      Zope-Interface < 4.1
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %description
56 Python 'interface' concept implementation.
57
58 %description -l pl.UTF-8
59 Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
60 języka Python.
61
62 %package -n python3-%{module}
63 Summary:        Python 'interface' concept implementation
64 Summary(pl.UTF-8):      Implementacja interfejsów dla języka Python
65 Group:          Libraries/Python
66 Requires:       python3-modules >= 1:3.5
67 Requires:       python3-zope-base
68
69 %description -n python3-%{module}
70 Python 'interface' concept implementation.
71
72 %description -n python3-%{module} -l pl.UTF-8
73 Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
74 języka Python.
75
76 %package apidocs
77 Summary:        API documentation for Python zope.interface module
78 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona zope.interface
79 Group:          Documentation
80 BuildArch:      noarch
81
82 %description apidocs
83 API documentation for Python zope.interface module.
84
85 %description apidocs -l pl.UTF-8
86 Dokumentacja API modułu Pythona zope.interface.
87
88 %prep
89 %setup -q -n %{module}-%{version}
90
91 %build
92 %if %{with python2}
93 %py_build %{?with_tests:test}
94 %endif
95
96 %if %{with python3}
97 %py3_build %{?with_tests:test}
98 %endif
99
100 %if %{with doc}
101 PYTHONPATH=$(pwd)/src \
102 %{__make} -C docs html \
103         SPHINXBUILD=sphinx-build-3
104 %endif
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108 %if %{with python2}
109 %py_install
110
111 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/zope/interface/*.c
112
113 %py_postclean
114 %endif
115
116 %if %{with python3}
117 %py3_install
118
119 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/zope/interface/*.c
120 %endif
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %if %{with python2}
126 %files
127 %defattr(644,root,root,755)
128 %doc CHANGES.rst COPYRIGHT.txt README.rst
129 %dir %{py_sitedir}/zope/interface
130 %{py_sitedir}/zope/interface/*.py[co]
131 %attr(755,root,root) %{py_sitedir}/zope/interface/_zope_interface_coptimizations.so
132 %{py_sitedir}/zope/interface/common
133 %{py_sitedir}/zope/interface/tests
134 %{py_sitedir}/zope.interface-%{version}-py*.egg-info
135 %{py_sitedir}/zope.interface-%{version}-py*-nspkg.pth
136 %endif
137
138 %if %{with python3}
139 %files -n python3-%{module}
140 %defattr(644,root,root,755)
141 %doc CHANGES.rst COPYRIGHT.txt README.rst
142 %dir %{py3_sitedir}/zope/interface
143 %{py3_sitedir}/zope/interface/*.py
144 %{py3_sitedir}/zope/interface/__pycache__
145 %attr(755,root,root) %{py3_sitedir}/zope/interface/_zope_interface_coptimizations*.so
146 %{py3_sitedir}/zope/interface/common
147 %{py3_sitedir}/zope/interface/tests
148 %{py3_sitedir}/zope.interface-%{version}-py*.egg-info
149 %{py3_sitedir}/zope.interface-%{version}-py*-nspkg.pth
150 %endif
151
152 %if %{with doc}
153 %files apidocs
154 %defattr(644,root,root,755)
155 %doc docs/_build/html/{_modules,_static,api,*.html,*.js}
156 %endif
This page took 0.066107 seconds and 4 git commands to generate.