]> git.pld-linux.org Git - packages/python-pygit2.git/blame - python-pygit2.spec
- updated to 0.24.0
[packages/python-pygit2.git] / python-pygit2.spec
CommitLineData
d127099e
ER
1# TODO:
2# building doc requires pygit2 installed in system
01a65240
KK
3#
4# Conditional build:
5%bcond_without tests # do not perform "make test"
e209e12c 6%bcond_without python2 # CPython 2.x module
01a65240 7%bcond_without python3 # CPython 3.x module
9630e8ce 8%bcond_without doc # documentation
01a65240
KK
9
10%define module pygit2
a7da3c5d
JB
11Summary: Python 2.x bindings for libgit2 library
12Summary(pl.UTF-8): Wiązania Pythona 2.x do biblioteki libgit2
01a65240 13Name: python-%{module}
e209e12c 14Version: 0.24.0
e269d40a 15Release: 1
01a65240
KK
16License: GPL v2 with linking exception
17Group: Libraries/Python
e209e12c 18#Source0Download: https://pypi.python.org/simple/pygit2/
be2c3764 19Source0: https://pypi.python.org/packages/source/p/pygit2/%{module}-%{version}.tar.gz
e209e12c 20# Source0-md5: 05f62d21f054c1a1559a726c7fdaeff1
2d087e32 21Patch0: %{name}-docbuild.patch
01a65240 22URL: https://pypi.python.org/pypi/pygit2
e209e12c
JB
23BuildRequires: libgit2-devel >= 0.24.0
24BuildRequires: rpm-pythonprov
25BuildRequires: rpmbuild(macros) >= 1.714
26%if %{with python2}
e507b989
JB
27BuildRequires: python-cffi
28BuildRequires: python-devel >= 1:2.7
067cd5ad 29BuildRequires: python-setuptools
e209e12c 30%endif
01a65240 31%if %{with python3}
e507b989
JB
32BuildRequires: python3-cffi
33BuildRequires: python3-devel >= 1:3.2
e507b989 34BuildRequires: python3-modules >= 1:3.2
067cd5ad 35BuildRequires: python3-setuptools
01a65240 36%endif
eff4580e 37%{?with_doc:BuildRequires: sphinx-pdg}
e209e12c 38Requires: libgit2 >= 0.24.0
e507b989 39Requires: python-cffi
01a65240
KK
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
43pygit2 is a set of Python bindings to the libgit2 shared library.
44
a7da3c5d
JB
45%description -l pl.UTF-8
46pygit2 to zbiór wiązań Pythona do biblioteki współdzielonej libgit2.
47
c6e2e8fd 48%package -n python3-%{module}
a7da3c5d
JB
49Summary: Python 3.x bindings for libgit2 library
50Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki libgit2
51Group: Libraries/Python
e209e12c 52Requires: libgit2 >= 0.24.0
e507b989 53Requires: python3-cffi
01a65240
KK
54
55%description -n python3-%{module}
56pygit2 is a set of Python bindings to the libgit2 shared library.
57
a7da3c5d
JB
58%description -n python3-%{module} -l pl.UTF-8
59pygit2 to zbiór wiązań Pythona do biblioteki współdzielonej libgit2.
60
01a65240 61%package apidoc
e209e12c
JB
62Summary: pygit2 module API documentation
63Summary(pl.UTF-8): Dokumentacja API modułu pygit2
01a65240
KK
64Group: Documentation
65
66%description apidoc
e209e12c 67API documentation for pygit2 module.
01a65240
KK
68
69%description apidoc -l pl.UTF-8
e209e12c 70Dokumentacja API modułu pygit2.
01a65240
KK
71
72%prep
73%setup -q -n %{module}-%{version}
6a54849d 74%patch0 -p1
01a65240 75
be2c3764
JB
76# these tests use network
77%{__rm} test/test_{credentials,repository}.py
78
01a65240 79%build
e209e12c 80%if %{with python2}
859cf233 81%py_build
859cf233 82%{?with_tests:%py_build test}
e209e12c 83%endif
01a65240
KK
84
85%if %{with python3}
d127099e
ER
86%py3_build
87%{?with_tests:%py3_build test}
01a65240
KK
88%endif
89
9630e8ce 90%if %{with doc}
01a65240 91cd docs
a7da3c5d
JB
92PACKAGE_BUILD=../build-2 \
93%{__make} -j1 html
e209e12c 94%{__rm} -r _build/html/_sources
01a65240
KK
95%endif
96
97%install
98rm -rf $RPM_BUILD_ROOT
e209e12c
JB
99
100%if%{with python2}
d127099e 101%py_install
01a65240 102%py_postclean
e209e12c 103%endif
01a65240
KK
104
105%if %{with python3}
859cf233 106%py3_install
01a65240
KK
107%endif
108
01a65240
KK
109%clean
110rm -rf $RPM_BUILD_ROOT
111
e209e12c 112%if %{with python2}
01a65240
KK
113%files
114%defattr(644,root,root,755)
115%doc COPYING README.rst TODO.txt
f193cb9b 116%dir %{py_sitedir}/pygit2
01a65240 117%{py_sitedir}/pygit2/*.py[co]
f193cb9b 118%{py_sitedir}/pygit2/decl.h
067cd5ad 119%attr(755,root,root) %{py_sitedir}/pygit2/_libgit2.so
f193cb9b 120%attr(755,root,root) %{py_sitedir}/_pygit2.so
f193cb9b 121%{py_sitedir}/pygit2-%{version}-py*.egg-info
e209e12c 122%endif
01a65240
KK
123
124%if %{with python3}
125%files -n python3-%{module}
126%defattr(644,root,root,755)
127%doc COPYING README.rst TODO.txt
f193cb9b 128%dir %{py3_sitedir}/pygit2
f193cb9b
JB
129%{py3_sitedir}/pygit2/decl.h
130%{py3_sitedir}/pygit2/*.py
131%{py3_sitedir}/pygit2/__pycache__
067cd5ad
JB
132%attr(755,root,root) %{py3_sitedir}/pygit2/_libgit2.cpython-*.so
133%attr(755,root,root) %{py3_sitedir}/_pygit2.cpython-*.so
f193cb9b 134%{py3_sitedir}/pygit2-%{version}-py*.egg-info
01a65240
KK
135%endif
136
9630e8ce 137%if %{with doc}
01a65240
KK
138%files apidoc
139%defattr(644,root,root,755)
140%doc docs/_build/html/*
141%endif
This page took 0.071905 seconds and 4 git commands to generate.