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