]> git.pld-linux.org Git - packages/python-pygit2.git/blob - python-pygit2.spec
367e8c2865b502f4d73e014815ae0f37d2586f64
[packages/python-pygit2.git] / python-pygit2.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # unit tests
4
5 %define         module          pygit2
6 %define         egg_name        pygit2
7 %define         pypi_name       pygit2
8 Summary:        Python bindings for libgit2 library
9 Summary(pl.UTF-8):      Wiązania Pythona do biblioteki libgit2
10 Name:           python-%{module}
11 Version:        1.6.1
12 Release:        3
13 License:        GPL v2 with linking exception
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/pygit2/
16 Source0:        https://files.pythonhosted.org/packages/source/p/pygit2/%{pypi_name}-%{version}.tar.gz
17 # Source0-md5:  dea86e8c5db413d547dc6509124ccbf9
18 Patch0:         libgit2-1.2.patch
19 URL:            https://pypi.org/project/pygit2/
20 BuildRequires:  libgit2-devel >= 1.1
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.714
23 BuildRequires:  python3-cffi >= 1.8.1
24 BuildRequires:  python3-devel >= 1:3.2
25 BuildRequires:  python3-modules >= 1:3.2
26 BuildRequires:  python3-setuptools
27 %{?with_tests:BuildRequires:    python3-pytest}
28 Requires:       libgit2 >= 1.1
29 Requires:       python-cffi
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 pygit2 is a set of Python bindings to the libgit2 shared library.
34
35 %description -l pl.UTF-8
36 pygit2 to zbiór wiązań Pythona do biblioteki współdzielonej libgit2.
37
38 %package -n python3-%{module}
39 Summary:        Python 3.x bindings for libgit2 library
40 Summary(pl.UTF-8):      Wiązania Pythona 3.x do biblioteki libgit2
41 Group:          Libraries/Python
42 Requires:       libgit2 >= 1.1
43 Requires:       python3-cffi
44
45 %description -n python3-%{module}
46 pygit2 is a set of Python bindings to the libgit2 shared library.
47
48 %description -n python3-%{module} -l pl.UTF-8
49 pygit2 to zbiór wiązań Pythona do biblioteki współdzielonej libgit2.
50
51 %prep
52 %setup -q -n %{module}-%{version}
53 %patch0 -p1
54
55 %build
56 %py3_build
57
58 %{?with_tests:PYTHONPATH=$(echo $(pwd)/build-3/lib.*) %{__python3} -m pytest test}
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62
63 %py3_install
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %files -n python3-%{module}
69 %defattr(644,root,root,755)
70 %doc AUTHORS.rst CHANGELOG.rst README.rst SPONSORS.rst
71 %dir %{py3_sitedir}/pygit2
72 %{py3_sitedir}/pygit2/decl
73 %{py3_sitedir}/pygit2/*.py
74 %{py3_sitedir}/pygit2/__pycache__
75 %attr(755,root,root) %{py3_sitedir}/pygit2/_libgit2.abi3.so
76 %attr(755,root,root) %{py3_sitedir}/pygit2/_pygit2.cpython-*.so
77 %{py3_sitedir}/pygit2-%{version}-py*.egg-info
This page took 0.050821 seconds and 2 git commands to generate.