2014-03-27 04:38:30 +00:00
|
|
|
%global pkgname pygit2
|
|
|
|
|
|
|
|
Name: python-%{pkgname}
|
2024-02-08 13:18:07 +00:00
|
|
|
Version: 1.14.0
|
2024-10-30 21:45:34 +00:00
|
|
|
Release: 4%{?dist}
|
2016-02-14 13:28:39 +00:00
|
|
|
Summary: Python bindings for libgit2
|
2017-04-10 21:01:47 +00:00
|
|
|
|
2023-12-18 09:28:33 +00:00
|
|
|
License: GPL-2.0-only WITH GCC-exception-2.0
|
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
|
2024-02-01 11:29:36 +00:00
|
|
|
Patch0: python-pygit2-transfer-size.patch
|
2023-11-10 23:17:32 +00:00
|
|
|
# This patch lowers the Python-level dependency on cffi. Fedora package python-cffi-1.15.1-5 and
|
|
|
|
# higher contain the patches needed for Python >= 3.12.
|
|
|
|
# Remove when cffi >= 1.16.0 is available on all releases with Python 3.12.
|
|
|
|
Patch: python-pygit2-cffiver.patch
|
2024-02-12 17:27:05 +00:00
|
|
|
# mock (by default) and koji builds never have network access, but testing
|
|
|
|
# that capability through a DNS resolution is not always accurate.
|
|
|
|
# Forcefully disable all network tests to avoid unnecessary build failures.
|
|
|
|
Patch: python-pygit2-network-tests.patch
|
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-09-07 20:29:39 +00:00
|
|
|
BuildRequires: (libgit2-devel >= 1.7.0 with libgit2-devel < 1.8.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-pytest
|
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
|
|
|
|
2023-11-10 23:17:32 +00:00
|
|
|
%generate_buildrequires
|
|
|
|
%pyproject_buildrequires
|
|
|
|
|
|
|
|
|
2014-03-27 04:38:30 +00:00
|
|
|
%build
|
2023-11-10 23:17:32 +00:00
|
|
|
%pyproject_wheel
|
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
|
2023-11-10 23:17:32 +00:00
|
|
|
%pyproject_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
|
2024-02-08 13:18:07 +00:00
|
|
|
%doc README.md
|
2023-11-10 23:17:32 +00:00
|
|
|
%{python3_sitearch}/%{pkgname}-*.dist-info/
|
2018-08-10 05:50:23 +00:00
|
|
|
%{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
|
2024-10-30 21:45:34 +00:00
|
|
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.14.0-4
|
2024-10-29 16:08:03 +00:00
|
|
|
- Bump release for October 2024 mass rebuild:
|
|
|
|
Resolves: RHEL-64018
|
|
|
|
|
2024-08-20 01:30:03 +00:00
|
|
|
* Mon Aug 19 2024 Stephen Gallagher <sgallagh@redhat.com> - 1.14.0-1
|
|
|
|
- Add gating.yaml
|
|
|
|
- Set Release value explicitly
|
|
|
|
|