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