]> git.pld-linux.org Git - packages/python-zope.interface.git/blame_incremental - python-zope.interface.spec
- updated to 5.5.2
[packages/python-zope.interface.git] / python-zope.interface.spec
... / ...
CommitLineData
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
9Summary: Python 'interface' concept implementation
10Summary(pl.UTF-8): Implementacja interfejsów dla języka Python
11Name: python-%{module}
12# keep 5.x here for python2 support
13Version: 5.5.2
14Release: 1
15License: ZPL v2.1
16Group: Libraries/Python
17#Source0Download: https://pypi.org/simple/zope.interface/
18Source0: https://files.pythonhosted.org/packages/source/z/zope.interface/zope.interface-%{version}.tar.gz
19# Source0-md5: 5a383d71156ce6f89f59a86d957a8d65
20URL: https://zopeinterface.readthedocs.io/
21%if %{with python2}
22BuildRequires: python >= 1:2.7
23BuildRequires: python-devel >= 1:2.7
24BuildRequires: python-setuptools
25%if %{with tests}
26BuildRequires: python-coverage >= 5.0.3
27BuildRequires: python-zope.event
28BuildRequires: python-zope.testing
29%endif
30%endif
31%if %{with python3}
32BuildRequires: python3 >= 1:3.5
33BuildRequires: python3-devel >= 1:3.5
34BuildRequires: python3-setuptools
35%if %{with tests}
36BuildRequires: python3-coverage >= 5.0.3
37BuildRequires: python3-zope.event
38BuildRequires: python3-zope.testing
39%endif
40%endif
41BuildRequires: rpm-pythonprov
42BuildRequires: rpmbuild(macros) >= 1.714
43%if %{with doc}
44BuildRequires: python3-repoze.sphinx.autointerface
45BuildRequires: sphinx-pdg-3
46%endif
47Requires: python-modules >= 1:2.7
48Requires: python-zope-base
49Provides: ZopeInterface
50Provides: Zope-Interface
51Obsoletes: ZopeInterface < 3.4.0
52Obsoletes: Zope-Interface < 4.1
53BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55%description
56Python 'interface' concept implementation.
57
58%description -l pl.UTF-8
59Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
60języka Python.
61
62%package -n python3-%{module}
63Summary: Python 'interface' concept implementation
64Summary(pl.UTF-8): Implementacja interfejsów dla języka Python
65Group: Libraries/Python
66Requires: python3-modules >= 1:3.5
67Requires: python3-zope-base
68
69%description -n python3-%{module}
70Python 'interface' concept implementation.
71
72%description -n python3-%{module} -l pl.UTF-8
73Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
74języka Python.
75
76%package apidocs
77Summary: API documentation for Python zope.interface module
78Summary(pl.UTF-8): Dokumentacja API modułu Pythona zope.interface
79Group: Documentation
80BuildArch: noarch
81
82%description apidocs
83API documentation for Python zope.interface module.
84
85%description apidocs -l pl.UTF-8
86Dokumentacja 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}
101PYTHONPATH=$(pwd)/src \
102%{__make} -C docs html \
103 SPHINXBUILD=sphinx-build-3
104%endif
105
106%install
107rm -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
123rm -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.141465 seconds and 5 git commands to generate.