]> git.pld-linux.org Git - packages/python-zope.interface.git/blob - python-zope.interface.spec
- rebuild with python 3.8
[packages/python-zope.interface.git] / python-zope.interface.spec
1 # TODO: finish docs build (requires Sphinx repoze.sphinx.autointerface extension)
2 #
3 # Conditional build:
4 %bcond_with     doc     # Sphinx documentation
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7 %bcond_without  tests   # unit tests
8
9 %define         module  zope.interface
10 Summary:        Python 'interface' concept implementation
11 Summary(pl.UTF-8):      Implementacja interfejsów dla języka Python
12 Name:           python-%{module}
13 Version:        4.5.0
14 Release:        3
15 License:        ZPL 2.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:  7b669cd692d817772c61d2e3ad0f1e71
20 URL:            http://docs.zope.org/zope.interface/
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.710
23 %if %{with python2}
24 BuildRequires:  python >= 1:2.7
25 BuildRequires:  python-devel >= 1:2.7
26 BuildRequires:  python-setuptools
27 %{?with_tests:BuildRequires:    python-zope.event}
28 %endif
29 %if %{with python3}
30 BuildRequires:  python3 >= 1:3.4
31 BuildRequires:  python3-devel >= 1:3.4
32 BuildRequires:  python3-setuptools
33 %{?with_tests:BuildRequires:    python3-zope.event}
34 %endif
35 %if %{with doc}
36 BuildRequires:  python3-repoze.sphinx.autointerface
37 BuildRequires:  sphinx-pdg-3
38 %endif
39 Requires:       python-modules >= 1:2.7
40 Requires:       python-zope-base
41 Provides:       ZopeInterface
42 Provides:       Zope-Interface
43 Obsoletes:      ZopeInterface
44 Obsoletes:      Zope-Interface
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 Python 'interface' concept implementation.
49
50 %description -l pl.UTF-8
51 Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
52 języka Python.
53
54 %package -n python3-%{module}
55 Summary:        Python 'interface' concept implementation
56 Summary(pl.UTF-8):      Implementacja interfejsów dla języka Python
57 Group:          Libraries/Python
58 Requires:       python3-modules >= 1:3.4
59 Requires:       python3-zope-base
60
61 %description -n python3-%{module}
62 Python 'interface' concept implementation.
63
64 %description -n python3-%{module} -l pl.UTF-8
65 Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
66 ję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
80 %if %{with doc}
81 PYTHONPATH=$(pwd)/src \
82 %{__make} -C docs html \
83         SPHINXBUILD=sphinx-build-2
84 %endif
85
86 %install
87 rm -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
103 rm -rf $RPM_BUILD_ROOT
104
105 %if %{with python2}
106 %files
107 %defattr(644,root,root,755)
108 %doc CHANGES.rst COPYRIGHT.txt README.rst
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
114 %{py_sitedir}/zope.interface-%{version}-py*.egg-info
115 %{py_sitedir}/zope.interface-%{version}-py*-nspkg.pth
116 %endif
117
118 %if %{with python3}
119 %files -n python3-%{module}
120 %defattr(644,root,root,755)
121 %doc CHANGES.rst COPYRIGHT.txt README.rst
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
128 %{py3_sitedir}/zope.interface-%{version}-py*.egg-info
129 %{py3_sitedir}/zope.interface-%{version}-py*-nspkg.pth
130 %endif
This page took 0.131707 seconds and 4 git commands to generate.