2014-03-27 04:38:30 +00:00
|
|
|
%global pkgname pygit2
|
|
|
|
|
|
|
|
Name: python-%{pkgname}
|
2023-06-26 12:17:36 +00:00
|
|
|
Version: 1.12.2
|
2022-12-09 01:01:34 +00:00
|
|
|
Release: %autorelease
|
2016-02-14 13:28:39 +00:00
|
|
|
Summary: Python bindings for libgit2
|
2017-04-10 21:01:47 +00:00
|
|
|
|
2016-04-18 07:22:36 +00:00
|
|
|
License: GPLv2 with linking exception
|
2019-04-07 11:14:24 +00:00
|
|
|
URL: https://www.pygit2.org/
|
2021-11-28 14:06:53 +00:00
|
|
|
Source0: https://github.com/libgit2/pygit2/archive/v%{version}.tar.gz#/%{pkgname}-%{version}.tar.gz
|
2016-04-18 07:22:36 +00:00
|
|
|
|
2021-11-28 14:06:53 +00:00
|
|
|
BuildRequires: make
|
2018-07-10 13:56:25 +00:00
|
|
|
BuildRequires: gcc
|
2023-03-22 07:06:58 +00:00
|
|
|
BuildRequires: (libgit2-devel >= 1.6.0 with libgit2-devel < 1.7.0)
|
2014-03-27 04:38:30 +00:00
|
|
|
|
|
|
|
%description
|
2017-04-10 21:01:47 +00:00
|
|
|
pygit2 is a set of Python bindings to the libgit2 library, which implements
|
2016-02-14 13:28:39 +00:00
|
|
|
the core of Git.
|
|
|
|
|
2019-06-18 17:46:26 +00:00
|
|
|
|
2014-03-27 04:38:30 +00:00
|
|
|
%package -n python3-%{pkgname}
|
2020-03-21 15:53:37 +00:00
|
|
|
Summary: Python 3 bindings for libgit2
|
2016-02-14 13:28:39 +00:00
|
|
|
%{?python_provide:%python_provide python3-%{pkgname}}
|
2019-06-18 17:46:26 +00:00
|
|
|
BuildRequires: python3-cffi
|
2014-03-27 04:38:30 +00:00
|
|
|
BuildRequires: python3-devel
|
2019-06-18 17:46:26 +00:00
|
|
|
BuildRequires: python3-pytest
|
2017-04-10 21:01:47 +00:00
|
|
|
BuildRequires: python3-setuptools
|
2014-08-14 08:27:49 +00:00
|
|
|
|
2014-03-27 04:38:30 +00:00
|
|
|
%description -n python3-%{pkgname}
|
2017-04-10 21:01:47 +00:00
|
|
|
pygit2 is a set of Python bindings to the libgit2 library, which implements
|
2016-02-14 13:28:39 +00:00
|
|
|
the core of Git.
|
2014-06-29 15:56:46 +00:00
|
|
|
|
2020-03-21 15:53:37 +00:00
|
|
|
The python3-%{pkgname} package contains the Python 3 bindings.
|
2018-08-20 21:57:28 +00:00
|
|
|
|
2019-06-18 17:46:26 +00:00
|
|
|
|
2014-03-27 04:38:30 +00:00
|
|
|
%package doc
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
BuildArch: noarch
|
2019-01-29 11:30:50 +00:00
|
|
|
BuildRequires: /usr/bin/sphinx-build
|
2021-11-28 14:18:19 +00:00
|
|
|
BuildRequires: python3-sphinx_rtd_theme
|
2014-03-27 04:38:30 +00:00
|
|
|
|
|
|
|
%description doc
|
|
|
|
Documentation for %{name}.
|
|
|
|
|
2019-06-18 17:46:26 +00:00
|
|
|
|
2014-03-27 04:38:30 +00:00
|
|
|
%prep
|
2016-02-14 13:28:39 +00:00
|
|
|
%autosetup -n %{pkgname}-%{version} -p1
|
2014-09-19 15:36:32 +00:00
|
|
|
|
2019-06-18 17:46:26 +00:00
|
|
|
|
2014-03-27 04:38:30 +00:00
|
|
|
%build
|
2016-02-14 13:28:39 +00:00
|
|
|
%py3_build
|
2019-06-18 17:46:26 +00:00
|
|
|
|
2019-01-29 11:33:43 +00:00
|
|
|
make -C docs html
|
2017-12-01 11:03:38 +00:00
|
|
|
|
2019-06-18 17:46:26 +00:00
|
|
|
|
2019-01-29 11:33:43 +00:00
|
|
|
%install
|
2016-02-14 13:28:39 +00:00
|
|
|
%py3_install
|
2019-06-06 17:00:46 +00:00
|
|
|
find %{_builddir} -name '.buildinfo' -print -delete
|
2014-03-27 04:38:30 +00:00
|
|
|
|
2019-06-18 17:46:26 +00:00
|
|
|
|
2014-03-27 04:38:30 +00:00
|
|
|
%check
|
2019-06-06 17:00:46 +00:00
|
|
|
# This is horrible, but otherwise pytest does not use pygit2 from site-packages
|
|
|
|
rm -f pygit2/__init__.py
|
2019-06-18 17:48:03 +00:00
|
|
|
# https://github.com/libgit2/pygit2/issues/812
|
|
|
|
%ifarch ppc64 s390x
|
2019-04-07 11:14:24 +00:00
|
|
|
PYTHONPATH=%{buildroot}%{python3_sitearch} py.test-%{python3_version} -v || :
|
2018-08-10 09:09:08 +00:00
|
|
|
%else
|
2019-04-07 11:14:24 +00:00
|
|
|
PYTHONPATH=%{buildroot}%{python3_sitearch} py.test-%{python3_version} -v
|
2018-08-10 09:09:08 +00:00
|
|
|
%endif
|
2017-12-01 11:03:38 +00:00
|
|
|
|
2019-06-18 17:46:26 +00:00
|
|
|
|
2014-03-27 04:38:30 +00:00
|
|
|
%files -n python3-%{pkgname}
|
2014-07-29 08:45:38 +00:00
|
|
|
%license COPYING
|
2020-03-21 15:50:37 +00:00
|
|
|
%doc README.rst
|
2018-08-10 05:50:23 +00:00
|
|
|
%{python3_sitearch}/%{pkgname}-*.egg-info/
|
|
|
|
%{python3_sitearch}/%{pkgname}/
|
2014-03-27 04:38:30 +00:00
|
|
|
|
|
|
|
%files doc
|
2017-01-10 12:55:12 +00:00
|
|
|
%license COPYING
|
2014-03-27 04:38:30 +00:00
|
|
|
%doc docs/_build/html/*
|
|
|
|
|
2019-06-18 17:46:26 +00:00
|
|
|
|
2014-03-27 04:38:30 +00:00
|
|
|
%changelog
|
2021-11-28 14:00:34 +00:00
|
|
|
%autochangelog
|