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