]> git.pld-linux.org Git - packages/python-dulwich.git/blame - python-dulwich.spec
- rebuild with python 3.8
[packages/python-dulwich.git] / python-dulwich.spec
CommitLineData
44b0d135
ER
1#
2# Conditional build:
08981c9a
JB
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
44b0d135
ER
8
9%define module dulwich
e156b51f 10Summary: A Python implementation of the Git file formats and protocols
b7a44a81 11Summary(pl.UTF-8): Pythonowa implementacja formatów plików i protokołów Gita
44b0d135 12Name: python-%{module}
4e2e36c5 13Version: 0.19.6
001cb13a 14Release: 4
b7a44a81 15License: GPL v2+ or Apache 2.0+
44b0d135 16Group: Libraries/Python
2ece093f 17Source0: https://www.dulwich.io/releases/%{module}-%{version}.tar.gz
4e2e36c5 18# Source0-md5: 5b048a0a86b132caa3e93520af64d81a
2bf830f1 19URL: https://www.dulwich.io/
08981c9a 20%if %{with python2}
2ece093f 21BuildRequires: python-devel >= 1:2.7
44b0d135 22BuildRequires: python-setuptools
91739a9d 23%if %{with tests}
b7a44a81
JB
24BuildRequires: python-gevent
25BuildRequires: python-geventhttpclient
91739a9d 26BuildRequires: python-nose
b7a44a81 27BuildRequires: python-setuptools >= 17.1
91739a9d 28%endif
08981c9a
JB
29%endif
30%if %{with python3}
31BuildRequires: python3-devel >= 1:3.3
32BuildRequires: python3-setuptools
33%if %{with tests}
34BuildRequires: python3-gevent
35BuildRequires: python3-geventhttpclient
36BuildRequires: python3-nose
37BuildRequires: python3-setuptools >= 17.1
38%endif
39%endif
40BuildRequires: rpm-pythonprov
41BuildRequires: rpmbuild(macros) >= 1.714
91739a9d
ER
42%if %{with doc}
43BuildRequires: python-docutils
1de419e4 44BuildRequires: sphinx-pdg-2
91739a9d 45%endif
b7a44a81 46Requires: python-modules >= 1:2.7
44b0d135
ER
47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49%description
e156b51f
ER
50Dulwich is a Python implementation of the Git file formats and
51protocols, which does not depend on Git itself.
52
53All functionality is available in pure Python. Optional C extensions
54can be built for improved performance.
55
56The project is named after the village in which Mr. and Mrs. Git live
57in the Monty Python sketch.
44b0d135 58
b7a44a81
JB
59%description -l pl.UTF-8
60Dulwich to pythonowa implementacja formatów plików i protokołów Gita,
61nie zależąca od samego Gita.
62
63Cała funkcjonalność jest dostępna w czystym Pythonie. Opcjonalnie
64można zbudować rozszerzenia w C poprawiające wydajność.
65
66Nazwa projektu wywodzi się od wioski, w której żyją Pan i Pani Git w
67skeczu Monty Pythona.
68
08981c9a
JB
69%package -n python3-%{module}
70Summary: A Python implementation of the Git file formats and protocols
71Summary(pl.UTF-8): Pythonowa implementacja formatów plików i protokołów Gita
72Group: Libraries/Python
73Requires: python3-modules >= 1:3.3
74
75%description -n python3-%{module}
76Dulwich is a Python implementation of the Git file formats and
77protocols, which does not depend on Git itself.
78
79All functionality is available in pure Python. Optional C extensions
80can be built for improved performance.
81
82The project is named after the village in which Mr. and Mrs. Git live
83in the Monty Python sketch.
84
85%description -n python3-%{module} -l pl.UTF-8
86Dulwich to pythonowa implementacja formatów plików i protokołów Gita,
87nie zależąca od samego Gita.
88
89Cała funkcjonalność jest dostępna w czystym Pythonie. Opcjonalnie
90można zbudować rozszerzenia w C poprawiające wydajność.
91
92Nazwa projektu wywodzi się od wioski, w której żyją Pan i Pani Git w
93skeczu Monty Pythona.
94
1de419e4
JB
95%package apidocs
96Summary: Documentation for Python Dulwich module
97Summary(pl.UTF-8): Dokumentacja moduły Pythona Dulwich
98Group: Documentation
6ba76264 99BuildArch: noarch
1de419e4
JB
100
101%description apidocs
102Documentation for Python Dulwich module.
103
104%description apidocs -l pl.UTF-8
105Dokumentacja moduły Pythona Dulwich.
106
44b0d135
ER
107%prep
108%setup -q -n %{module}-%{version}
b7a44a81
JB
109
110%{__rm} -r %{module}.egg-info
44b0d135
ER
111
112%build
08981c9a 113%if %{with python2}
2dfc2e3a 114%py_build
44b0d135
ER
115
116%if %{with tests}
08981c9a
JB
117nosetests-%{py_ver} dulwich/tests/test*.py
118%endif
119%endif
120
121%if %{with python3}
122%py3_build
123
124%if %{with tests}
125nosetests-%{py3_ver} dulwich/tests/test*.py
126%endif
44b0d135
ER
127%endif
128
91739a9d 129%if %{with doc}
44b0d135 130# sphinx fails with it from time to time with parallel build
1de419e4
JB
131%{__make} -C docs -j1 html \
132 SPHINXBUILD=sphinx-build-2
91739a9d 133%endif
44b0d135
ER
134
135%install
136rm -rf $RPM_BUILD_ROOT
08981c9a
JB
137
138%if %{with python2}
2dfc2e3a 139%py_install
44b0d135 140
08981c9a
JB
141for p in dul-receive-pack dul-upload-pack dulwich ; do
142 %{__mv} $RPM_BUILD_ROOT%{_bindir}/$p $RPM_BUILD_ROOT%{_bindir}/${p}-2
143done
144
1de419e4 145%py_postclean
44b0d135
ER
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
08981c9a
JB
150%endif
151
152%if %{with python3}
153%py3_install
154
155for p in dul-receive-pack dul-upload-pack dulwich ; do
156 %{__mv} $RPM_BUILD_ROOT%{_bindir}/$p $RPM_BUILD_ROOT%{_bindir}/${p}-3
157done
158
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
163%endif
164
165for 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}
167done
44b0d135 168
44b0d135
ER
169%clean
170rm -rf $RPM_BUILD_ROOT
171
08981c9a 172%if %{with python2}
44b0d135
ER
173%files
174%defattr(644,root,root,755)
1de419e4 175%doc AUTHORS COPYING NEWS README.md README.swift.md TODO
08981c9a
JB
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}
44b0d135
ER
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
08981c9a 183%endif
44b0d135 184%dir %{py_sitedir}/%{module}
44b0d135
ER
185%{py_sitedir}/%{module}/*.py[co]
186%attr(755,root,root) %{py_sitedir}/%{module}/_*.so
b7a44a81 187%dir %{py_sitedir}/%{module}/contrib
44b0d135 188%{py_sitedir}/%{module}/contrib/*.py[co]
b7a44a81 189%{py_sitedir}/%{module}-%{version}-py*.egg-info
08981c9a
JB
190%endif
191
192%if %{with python3}
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
203%endif
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
212%endif
1de419e4
JB
213
214%if %{with doc}
215%files apidocs
216%defattr(644,root,root,755)
217%doc docs/build/html/{_static,tutorial,*.html,*.js}
218%endif
This page took 0.129305 seconds and 4 git commands to generate.