3 %bcond_with tests # do not perform "make test"
4 %bcond_without doc # don't build doc
7 Summary: A Python implementation of the Git file formats and protocols
11 License: GPLv2+ or ASL 2.0
12 Group: Libraries/Python
13 Source0: https://pypi.python.org/packages/source/d/%{module}/%{module}-%{version}.tar.gz
14 # Source0-md5: ef70dce05422015373ca2704ddf281e7
15 URL: https://www.dulwich.io/
16 BuildRequires: python-devel
17 BuildRequires: python-setuptools
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.710
21 BuildRequires: python-nose
24 BuildRequires: python-docutils
25 BuildRequires: sphinx-pdg
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Dulwich is a Python implementation of the Git file formats and
31 protocols, which does not depend on Git itself.
33 All functionality is available in pure Python. Optional C extensions
34 can be built for improved performance.
36 The project is named after the village in which Mr. and Mrs. Git live
37 in the Monty Python sketch.
40 %setup -q -n %{module}-%{version}
41 rm -r %{module}.egg-info
45 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
50 nosetests-%{py_ver} test*.py
54 # sphinx fails with it from time to time with parallel build
55 %{__make} -C docs -j html
56 rm -r docs/build/html/_sources
57 rm docs/build/html/{.buildinfo,objects.inv}
61 rm -rf $RPM_BUILD_ROOT
64 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/%{module}/*.[ch]
65 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/tests
66 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/contrib/test_*.py*
67 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/docs/tutorial
72 rm -rf $RPM_BUILD_ROOT
75 %defattr(644,root,root,755)
76 %doc AUTHORS COPYING %{?with_doc:docs/build/html}
77 %attr(755,root,root) %{_bindir}/dul-receive-pack
78 %attr(755,root,root) %{_bindir}/dul-upload-pack
79 %attr(755,root,root) %{_bindir}/dulwich
80 %dir %{py_sitedir}/%{module}
81 %dir %{py_sitedir}/%{module}/contrib
82 %{py_sitedir}/%{module}/*.py[co]
83 %attr(755,root,root) %{py_sitedir}/%{module}/_*.so
84 %{py_sitedir}/%{module}-%{version}-py*.egg-info
85 %{py_sitedir}/%{module}/contrib/*.py[co]