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