]>
Commit | Line | Data |
---|---|---|
01a65240 KK |
1 | # |
2 | # Conditional build: | |
b06b30e6 | 3 | %bcond_with tests # unit tests |
01a65240 | 4 | |
dedf2ec2 ER |
5 | %define module pygit2 |
6 | %define egg_name pygit2 | |
7 | %define pypi_name pygit2 | |
73d8bb66 JR |
8 | Summary: Python bindings for libgit2 library |
9 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki libgit2 | |
01a65240 | 10 | Name: python-%{module} |
73d8bb66 JR |
11 | Version: 1.2.1 |
12 | Release: 1 | |
01a65240 KK |
13 | License: GPL v2 with linking exception |
14 | Group: Libraries/Python | |
008db684 JB |
15 | #Source0Download: https://pypi.org/simple/pygit2/ |
16 | Source0: https://files.pythonhosted.org/packages/source/p/pygit2/%{pypi_name}-%{version}.tar.gz | |
73d8bb66 | 17 | # Source0-md5: 20aa2d7a80d28ee87f5a17f373444f6f |
008db684 | 18 | URL: https://pypi.org/project/pygit2/ |
73d8bb66 | 19 | BuildRequires: libgit2-devel >= 1.0 |
e209e12c JB |
20 | BuildRequires: rpm-pythonprov |
21 | BuildRequires: rpmbuild(macros) >= 1.714 | |
1b7c38dc | 22 | BuildRequires: python3-cffi >= 1.8.1 |
e507b989 | 23 | BuildRequires: python3-devel >= 1:3.2 |
e507b989 | 24 | BuildRequires: python3-modules >= 1:3.2 |
067cd5ad | 25 | BuildRequires: python3-setuptools |
b06b30e6 | 26 | BuildRequires: python3-pytest |
e209e12c | 27 | Requires: libgit2 >= 0.24.0 |
e507b989 | 28 | Requires: python-cffi |
01a65240 KK |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | %description | |
32 | pygit2 is a set of Python bindings to the libgit2 shared library. | |
33 | ||
a7da3c5d JB |
34 | %description -l pl.UTF-8 |
35 | pygit2 to zbiór wiązań Pythona do biblioteki współdzielonej libgit2. | |
36 | ||
c6e2e8fd | 37 | %package -n python3-%{module} |
a7da3c5d JB |
38 | Summary: Python 3.x bindings for libgit2 library |
39 | Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki libgit2 | |
40 | Group: Libraries/Python | |
e209e12c | 41 | Requires: libgit2 >= 0.24.0 |
e507b989 | 42 | Requires: python3-cffi |
01a65240 KK |
43 | |
44 | %description -n python3-%{module} | |
45 | pygit2 is a set of Python bindings to the libgit2 shared library. | |
46 | ||
a7da3c5d JB |
47 | %description -n python3-%{module} -l pl.UTF-8 |
48 | pygit2 to zbiór wiązań Pythona do biblioteki współdzielonej libgit2. | |
49 | ||
01a65240 KK |
50 | %prep |
51 | %setup -q -n %{module}-%{version} | |
be2c3764 | 52 | |
01a65240 | 53 | %build |
b06b30e6 JP |
54 | %py3_build |
55 | ||
56 | %{?with_tests:PYTHONPATH=$(echo $(pwd)/build-3/lib.*) %{__python3} -m pytest test} | |
01a65240 KK |
57 | |
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
e209e12c | 60 | |
859cf233 | 61 | %py3_install |
01a65240 | 62 | |
01a65240 KK |
63 | %clean |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
01a65240 KK |
66 | %files -n python3-%{module} |
67 | %defattr(644,root,root,755) | |
73d8bb66 | 68 | %doc AUTHORS.rst CHANGELOG.rst README.rst SPONSORS.rst |
f193cb9b | 69 | %dir %{py3_sitedir}/pygit2 |
b06b30e6 | 70 | %{py3_sitedir}/pygit2/decl |
f193cb9b JB |
71 | %{py3_sitedir}/pygit2/*.py |
72 | %{py3_sitedir}/pygit2/__pycache__ | |
1b7c38dc | 73 | %attr(755,root,root) %{py3_sitedir}/pygit2/_libgit2.abi3.so |
73d8bb66 | 74 | %attr(755,root,root) %{py3_sitedir}/pygit2/_pygit2.cpython-*.so |
f193cb9b | 75 | %{py3_sitedir}/pygit2-%{version}-py*.egg-info |