]> git.pld-linux.org Git - packages/python-dulwich.git/blob - python-dulwich.spec
update url
[packages/python-dulwich.git] / python-dulwich.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # do not perform "make test"
4 %bcond_without  doc     # don't build doc
5
6 %define         module  dulwich
7 Summary:        A Python implementation of the Git file formats and protocols
8 Name:           python-%{module}
9 Version:        0.11.2
10 Release:        1
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
20 %if %{with tests}
21 BuildRequires:  python-nose
22 %endif
23 %if %{with doc}
24 BuildRequires:  python-docutils
25 BuildRequires:  sphinx-pdg
26 %endif
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 Dulwich is a Python implementation of the Git file formats and
31 protocols, which does not depend on Git itself.
32
33 All functionality is available in pure Python. Optional C extensions
34 can be built for improved performance.
35
36 The project is named after the village in which Mr. and Mrs. Git live
37 in the Monty Python sketch.
38
39 %prep
40 %setup -q -n %{module}-%{version}
41 rm -r %{module}.egg-info
42
43 %build
44 CC="%{__cc}" \
45 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
46 %py_build
47
48 %if %{with tests}
49 cd dulwich/tests
50 nosetests-%{py_ver} test*.py
51 %endif
52
53 %if %{with doc}
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}
58 %endif
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 %py_install
63
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
68
69 %py_postclean
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %files
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]
This page took 0.080463 seconds and 3 git commands to generate.