]>
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} |
9ec37f0a | 11 | Version: 1.6.1 |
824108ee | 12 | Release: 4 |
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 | |
9ec37f0a | 17 | # Source0-md5: dea86e8c5db413d547dc6509124ccbf9 |
23991171 | 18 | Patch0: libgit2-1.2.patch |
008db684 | 19 | URL: https://pypi.org/project/pygit2/ |
150f68ce | 20 | BuildRequires: libgit2-devel >= 1.1 |
e209e12c JB |
21 | BuildRequires: rpm-pythonprov |
22 | BuildRequires: rpmbuild(macros) >= 1.714 | |
1b7c38dc | 23 | BuildRequires: python3-cffi >= 1.8.1 |
e507b989 | 24 | BuildRequires: python3-devel >= 1:3.2 |
e507b989 | 25 | BuildRequires: python3-modules >= 1:3.2 |
067cd5ad | 26 | BuildRequires: python3-setuptools |
c84dc49b | 27 | %{?with_tests:BuildRequires: python3-pytest} |
150f68ce | 28 | Requires: libgit2 >= 1.1 |
e507b989 | 29 | Requires: python-cffi |
01a65240 KK |
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 | ||
a7da3c5d JB |
35 | %description -l pl.UTF-8 |
36 | pygit2 to zbiór wiązań Pythona do biblioteki współdzielonej libgit2. | |
37 | ||
c6e2e8fd | 38 | %package -n python3-%{module} |
a7da3c5d JB |
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 | |
150f68ce | 42 | Requires: libgit2 >= 1.1 |
e507b989 | 43 | Requires: python3-cffi |
01a65240 KK |
44 | |
45 | %description -n python3-%{module} | |
46 | pygit2 is a set of Python bindings to the libgit2 shared library. | |
47 | ||
a7da3c5d JB |
48 | %description -n python3-%{module} -l pl.UTF-8 |
49 | pygit2 to zbiór wiązań Pythona do biblioteki współdzielonej libgit2. | |
50 | ||
01a65240 KK |
51 | %prep |
52 | %setup -q -n %{module}-%{version} | |
23991171 | 53 | %patch0 -p1 |
be2c3764 | 54 | |
01a65240 | 55 | %build |
b06b30e6 JP |
56 | %py3_build |
57 | ||
58 | %{?with_tests:PYTHONPATH=$(echo $(pwd)/build-3/lib.*) %{__python3} -m pytest test} | |
01a65240 KK |
59 | |
60 | %install | |
61 | rm -rf $RPM_BUILD_ROOT | |
e209e12c | 62 | |
859cf233 | 63 | %py3_install |
01a65240 | 64 | |
01a65240 KK |
65 | %clean |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | ||
01a65240 KK |
68 | %files -n python3-%{module} |
69 | %defattr(644,root,root,755) | |
73d8bb66 | 70 | %doc AUTHORS.rst CHANGELOG.rst README.rst SPONSORS.rst |
f193cb9b | 71 | %dir %{py3_sitedir}/pygit2 |
b06b30e6 | 72 | %{py3_sitedir}/pygit2/decl |
f193cb9b JB |
73 | %{py3_sitedir}/pygit2/*.py |
74 | %{py3_sitedir}/pygit2/__pycache__ | |
1b7c38dc | 75 | %attr(755,root,root) %{py3_sitedir}/pygit2/_libgit2.abi3.so |
73d8bb66 | 76 | %attr(755,root,root) %{py3_sitedir}/pygit2/_pygit2.cpython-*.so |
f193cb9b | 77 | %{py3_sitedir}/pygit2-%{version}-py*.egg-info |