3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_with python3_default # default binary names to Python 3 version
6 %bcond_without tests # nose tests
7 %bcond_without doc # don't build doc
10 Summary: A Python implementation of the Git file formats and protocols
11 Summary(pl.UTF-8): Pythonowa implementacja formatów plików i protokołów Gita
12 Name: python-%{module}
15 License: GPL v2+ or Apache 2.0+
16 Group: Libraries/Python
17 Source0: https://www.dulwich.io/releases/%{module}-%{version}.tar.gz
18 # Source0-md5: 5b048a0a86b132caa3e93520af64d81a
19 URL: https://www.dulwich.io/
21 BuildRequires: python-devel >= 1:2.7
22 BuildRequires: python-setuptools
24 BuildRequires: python-gevent
25 BuildRequires: python-geventhttpclient
26 BuildRequires: python-nose
27 BuildRequires: python-setuptools >= 17.1
31 BuildRequires: python3-devel >= 1:3.3
32 BuildRequires: python3-setuptools
34 BuildRequires: python3-gevent
35 BuildRequires: python3-geventhttpclient
36 BuildRequires: python3-nose
37 BuildRequires: python3-setuptools >= 17.1
40 BuildRequires: rpm-pythonprov
41 BuildRequires: rpmbuild(macros) >= 1.714
43 BuildRequires: python-docutils
44 BuildRequires: sphinx-pdg-2
46 Requires: python-modules >= 1:2.7
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 Dulwich is a Python implementation of the Git file formats and
51 protocols, which does not depend on Git itself.
53 All functionality is available in pure Python. Optional C extensions
54 can be built for improved performance.
56 The project is named after the village in which Mr. and Mrs. Git live
57 in the Monty Python sketch.
59 %description -l pl.UTF-8
60 Dulwich to pythonowa implementacja formatów plików i protokołów Gita,
61 nie zależąca od samego Gita.
63 Cała funkcjonalność jest dostępna w czystym Pythonie. Opcjonalnie
64 można zbudować rozszerzenia w C poprawiające wydajność.
66 Nazwa projektu wywodzi się od wioski, w której żyją Pan i Pani Git w
69 %package -n python3-%{module}
70 Summary: A Python implementation of the Git file formats and protocols
71 Summary(pl.UTF-8): Pythonowa implementacja formatów plików i protokołów Gita
72 Group: Libraries/Python
73 Requires: python3-modules >= 1:3.3
75 %description -n python3-%{module}
76 Dulwich is a Python implementation of the Git file formats and
77 protocols, which does not depend on Git itself.
79 All functionality is available in pure Python. Optional C extensions
80 can be built for improved performance.
82 The project is named after the village in which Mr. and Mrs. Git live
83 in the Monty Python sketch.
85 %description -n python3-%{module} -l pl.UTF-8
86 Dulwich to pythonowa implementacja formatów plików i protokołów Gita,
87 nie zależąca od samego Gita.
89 Cała funkcjonalność jest dostępna w czystym Pythonie. Opcjonalnie
90 można zbudować rozszerzenia w C poprawiające wydajność.
92 Nazwa projektu wywodzi się od wioski, w której żyją Pan i Pani Git w
96 Summary: Documentation for Python Dulwich module
97 Summary(pl.UTF-8): Dokumentacja moduły Pythona Dulwich
102 Documentation for Python Dulwich module.
104 %description apidocs -l pl.UTF-8
105 Dokumentacja moduły Pythona Dulwich.
108 %setup -q -n %{module}-%{version}
110 %{__rm} -r %{module}.egg-info
117 nosetests-%{py_ver} dulwich/tests/test*.py
125 nosetests-%{py3_ver} dulwich/tests/test*.py
130 # sphinx fails with it from time to time with parallel build
131 %{__make} -C docs -j1 html \
132 SPHINXBUILD=sphinx-build-2
136 rm -rf $RPM_BUILD_ROOT
141 for p in dul-receive-pack dul-upload-pack dulwich ; do
142 %{__mv} $RPM_BUILD_ROOT%{_bindir}/$p $RPM_BUILD_ROOT%{_bindir}/${p}-2
146 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/%{module}/*.[ch]
147 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/tests
148 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/contrib/test_*.py*
149 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/docs/tutorial
155 for p in dul-receive-pack dul-upload-pack dulwich ; do
156 %{__mv} $RPM_BUILD_ROOT%{_bindir}/$p $RPM_BUILD_ROOT%{_bindir}/${p}-3
159 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/*.[ch]
160 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/tests
161 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/contrib/test_*.py*
162 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/docs/tutorial
165 for p in dul-receive-pack dul-upload-pack dulwich ; do
166 ln -sf ${p}-%{?with_python3_default:3}%{!?with_python3_default:2} $RPM_BUILD_ROOT%{_bindir}/${p}
170 rm -rf $RPM_BUILD_ROOT
174 %defattr(644,root,root,755)
175 %doc AUTHORS COPYING NEWS README.md README.swift.md TODO
176 %attr(755,root,root) %{_bindir}/dul-receive-pack-2
177 %attr(755,root,root) %{_bindir}/dul-upload-pack-2
178 %attr(755,root,root) %{_bindir}/dulwich-2
179 %if %{without python3_default}
180 %attr(755,root,root) %{_bindir}/dul-receive-pack
181 %attr(755,root,root) %{_bindir}/dul-upload-pack
182 %attr(755,root,root) %{_bindir}/dulwich
184 %dir %{py_sitedir}/%{module}
185 %{py_sitedir}/%{module}/*.py[co]
186 %attr(755,root,root) %{py_sitedir}/%{module}/_*.so
187 %dir %{py_sitedir}/%{module}/contrib
188 %{py_sitedir}/%{module}/contrib/*.py[co]
189 %{py_sitedir}/%{module}-%{version}-py*.egg-info
193 %files -n python3-%{module}
194 %defattr(644,root,root,755)
195 %doc AUTHORS COPYING NEWS README.md README.swift.md TODO
196 %attr(755,root,root) %{_bindir}/dul-receive-pack-3
197 %attr(755,root,root) %{_bindir}/dul-upload-pack-3
198 %attr(755,root,root) %{_bindir}/dulwich-3
199 %if %{with python3_default}
200 %attr(755,root,root) %{_bindir}/dul-receive-pack
201 %attr(755,root,root) %{_bindir}/dul-upload-pack
202 %attr(755,root,root) %{_bindir}/dulwich
204 %dir %{py3_sitedir}/%{module}
205 %{py3_sitedir}/%{module}/*.py
206 %{py3_sitedir}/%{module}/__pycache__
207 %attr(755,root,root) %{py3_sitedir}/%{module}/_*.cpython-*.so
208 %dir %{py3_sitedir}/%{module}/contrib
209 %{py3_sitedir}/%{module}/contrib/*.py
210 %{py3_sitedir}/%{module}/contrib/__pycache__
211 %{py3_sitedir}/%{module}-%{version}-py*.egg-info
216 %defattr(644,root,root,755)
217 %doc docs/build/html/{_static,tutorial,*.html,*.js}