]>
Commit | Line | Data |
---|---|---|
2ece093f ER |
1 | # TODO |
2 | # - python3 package | |
44b0d135 ER |
3 | # |
4 | # Conditional build: | |
5 | %bcond_with tests # do not perform "make test" | |
91739a9d | 6 | %bcond_without doc # don't build doc |
44b0d135 ER |
7 | |
8 | %define module dulwich | |
e156b51f | 9 | Summary: A Python implementation of the Git file formats and protocols |
b7a44a81 | 10 | Summary(pl.UTF-8): Pythonowa implementacja formatów plików i protokołów Gita |
44b0d135 | 11 | Name: python-%{module} |
b7a44a81 | 12 | Version: 0.17.3 |
44b0d135 | 13 | Release: 1 |
b7a44a81 | 14 | License: GPL v2+ or Apache 2.0+ |
44b0d135 | 15 | Group: Libraries/Python |
2ece093f | 16 | Source0: https://www.dulwich.io/releases/%{module}-%{version}.tar.gz |
b7a44a81 | 17 | # Source0-md5: 2e5a14b1f4cbc9207b8a4134683a6054 |
2bf830f1 | 18 | URL: https://www.dulwich.io/ |
2ece093f | 19 | BuildRequires: python-devel >= 1:2.7 |
44b0d135 ER |
20 | BuildRequires: python-setuptools |
21 | BuildRequires: rpm-pythonprov | |
b7a44a81 | 22 | BuildRequires: rpmbuild(macros) >= 1.714 |
91739a9d | 23 | %if %{with tests} |
b7a44a81 JB |
24 | BuildRequires: python-gevent |
25 | BuildRequires: python-geventhttpclient | |
91739a9d | 26 | BuildRequires: python-nose |
b7a44a81 | 27 | BuildRequires: python-setuptools >= 17.1 |
91739a9d ER |
28 | %endif |
29 | %if %{with doc} | |
30 | BuildRequires: python-docutils | |
44b0d135 | 31 | BuildRequires: sphinx-pdg |
91739a9d | 32 | %endif |
b7a44a81 | 33 | Requires: python-modules >= 1:2.7 |
44b0d135 ER |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
35 | ||
36 | %description | |
e156b51f ER |
37 | Dulwich is a Python implementation of the Git file formats and |
38 | protocols, which does not depend on Git itself. | |
39 | ||
40 | All functionality is available in pure Python. Optional C extensions | |
41 | can be built for improved performance. | |
42 | ||
43 | The project is named after the village in which Mr. and Mrs. Git live | |
44 | in the Monty Python sketch. | |
44b0d135 | 45 | |
b7a44a81 JB |
46 | %description -l pl.UTF-8 |
47 | Dulwich to pythonowa implementacja formatów plików i protokołów Gita, | |
48 | nie zależąca od samego Gita. | |
49 | ||
50 | Cała funkcjonalność jest dostępna w czystym Pythonie. Opcjonalnie | |
51 | można zbudować rozszerzenia w C poprawiające wydajność. | |
52 | ||
53 | Nazwa projektu wywodzi się od wioski, w której żyją Pan i Pani Git w | |
54 | skeczu Monty Pythona. | |
55 | ||
44b0d135 ER |
56 | %prep |
57 | %setup -q -n %{module}-%{version} | |
b7a44a81 JB |
58 | |
59 | %{__rm} -r %{module}.egg-info | |
44b0d135 ER |
60 | |
61 | %build | |
2dfc2e3a | 62 | %py_build |
44b0d135 ER |
63 | |
64 | %if %{with tests} | |
65 | cd dulwich/tests | |
66 | nosetests-%{py_ver} test*.py | |
b7a44a81 | 67 | cd ../.. |
44b0d135 ER |
68 | %endif |
69 | ||
91739a9d | 70 | %if %{with doc} |
44b0d135 ER |
71 | # sphinx fails with it from time to time with parallel build |
72 | %{__make} -C docs -j html | |
b7a44a81 JB |
73 | %{__rm} -r docs/build/html/_sources |
74 | %{__rm} docs/build/html/{.buildinfo,objects.inv} | |
91739a9d | 75 | %endif |
44b0d135 ER |
76 | |
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
2dfc2e3a | 79 | %py_install |
44b0d135 ER |
80 | |
81 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/%{module}/*.[ch] | |
82 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/tests | |
83 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/contrib/test_*.py* | |
84 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/docs/tutorial | |
85 | ||
86 | %py_postclean | |
87 | ||
88 | %clean | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
91 | %files | |
92 | %defattr(644,root,root,755) | |
b7a44a81 | 93 | %doc AUTHORS COPYING NEWS README.md README.swift.md TODO %{?with_doc:docs/build/html} |
44b0d135 ER |
94 | %attr(755,root,root) %{_bindir}/dul-receive-pack |
95 | %attr(755,root,root) %{_bindir}/dul-upload-pack | |
96 | %attr(755,root,root) %{_bindir}/dulwich | |
97 | %dir %{py_sitedir}/%{module} | |
44b0d135 ER |
98 | %{py_sitedir}/%{module}/*.py[co] |
99 | %attr(755,root,root) %{py_sitedir}/%{module}/_*.so | |
b7a44a81 | 100 | %dir %{py_sitedir}/%{module}/contrib |
44b0d135 | 101 | %{py_sitedir}/%{module}/contrib/*.py[co] |
b7a44a81 | 102 | %{py_sitedir}/%{module}-%{version}-py*.egg-info |