2019-04-07 17:45:39 +00:00
|
|
|
%if 0%{?fedora} && 0%{?fedora} <= 28
|
|
|
|
# https://github.com/libgit2/pygit2/issues/811
|
|
|
|
# https://github.com/libgit2/pygit2/issues/812
|
|
|
|
%global arch_test_fail aarch64 ppc64 s390x
|
|
|
|
%else
|
|
|
|
# https://github.com/libgit2/pygit2/issues/811
|
|
|
|
%global arch_test_fail ppc64 s390x
|
|
|
|
%endif
|
2019-04-07 11:14:24 +00:00
|
|
|
%global pkgname pygit2
|
2019-06-06 12:35:30 +00:00
|
|
|
%{?python_enable_dependency_generator}
|
2019-04-07 11:14:24 +00:00
|
|
|
|
|
|
|
Name: python-%{pkgname}
|
2019-06-06 12:35:30 +00:00
|
|
|
Version: 0.28.2
|
2019-04-07 11:14:24 +00:00
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Python bindings for libgit2
|
|
|
|
|
|
|
|
License: GPLv2 with linking exception
|
|
|
|
URL: https://www.pygit2.org/
|
|
|
|
Source0: https://github.com/libgit2/%{pkgname}/archive/v%{version}/%{pkgname}-%{version}.tar.gz
|
|
|
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: (libgit2-devel >= 0.28.0 with libgit2-devel < 0.29.0)
|
|
|
|
|
|
|
|
%description
|
|
|
|
pygit2 is a set of Python bindings to the libgit2 library, which implements
|
|
|
|
the core of Git.
|
|
|
|
|
|
|
|
%package -n python2-%{pkgname}
|
|
|
|
Summary: Python 2.x bindings for libgit2
|
|
|
|
%{?python_provide:%python_provide python2-%{pkgname}}
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
BuildRequires: python2-cffi
|
|
|
|
BuildRequires: python2-six
|
|
|
|
BuildRequires: python2-pytest
|
|
|
|
|
|
|
|
%description -n python2-%{pkgname}
|
|
|
|
pygit2 is a set of Python bindings to the libgit2 library, which implements
|
|
|
|
the core of Git.
|
|
|
|
|
|
|
|
Python 2 version.
|
|
|
|
|
|
|
|
%package -n python3-%{pkgname}
|
|
|
|
Summary: Python 3.x bindings for libgit2
|
|
|
|
%{?python_provide:%python_provide python3-%{pkgname}}
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
BuildRequires: python3-cffi
|
|
|
|
BuildRequires: python3-six
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
|
|
|
%description -n python3-%{pkgname}
|
|
|
|
pygit2 is a set of Python bindings to the libgit2 library, which implements
|
|
|
|
the core of Git.
|
|
|
|
|
|
|
|
Python 3 version.
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: /usr/bin/sphinx-build
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
Documentation for %{name}.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -n %{pkgname}-%{version} -p1
|
|
|
|
|
|
|
|
%build
|
|
|
|
%py2_build
|
|
|
|
%py3_build
|
|
|
|
make -C docs html
|
|
|
|
|
|
|
|
%install
|
|
|
|
%py2_install
|
|
|
|
%py3_install
|
|
|
|
find %{_builddir} -name '.buildinfo' -delete
|
|
|
|
|
|
|
|
# Correct the permissions.
|
|
|
|
find %{buildroot} -name '*.so' -exec chmod 755 {} ';'
|
|
|
|
|
|
|
|
%check
|
2019-04-07 18:12:53 +00:00
|
|
|
%ifarch %{arch_test_fail}
|
2019-04-07 11:14:24 +00:00
|
|
|
PYTHONPATH=%{buildroot}%{python2_sitearch} py.test-%{python2_version} -v || :
|
|
|
|
PYTHONPATH=%{buildroot}%{python3_sitearch} py.test-%{python3_version} -v || :
|
|
|
|
%else
|
|
|
|
PYTHONPATH=%{buildroot}%{python2_sitearch} py.test-%{python2_version} -v
|
|
|
|
PYTHONPATH=%{buildroot}%{python3_sitearch} py.test-%{python3_version} -v
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files -n python2-%{pkgname}
|
|
|
|
%doc README.rst TODO.txt
|
|
|
|
%license COPYING
|
|
|
|
%{python2_sitearch}/%{pkgname}-*.egg-info/
|
|
|
|
%{python2_sitearch}/%{pkgname}/
|
|
|
|
%{python2_sitearch}/_%{pkgname}.so
|
|
|
|
|
|
|
|
%files -n python3-%{pkgname}
|
|
|
|
%doc README.rst TODO.txt
|
|
|
|
%license COPYING
|
|
|
|
%{python3_sitearch}/%{pkgname}-*.egg-info/
|
|
|
|
%{python3_sitearch}/%{pkgname}/
|
|
|
|
%{python3_sitearch}/_%{pkgname}.*.so
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
%license COPYING
|
|
|
|
%doc docs/_build/html/*
|
|
|
|
|
|
|
|
%changelog
|
2019-06-06 12:35:30 +00:00
|
|
|
* Thu Jun 06 14:32:34 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.28.2-1
|
|
|
|
- Update to 0.28.2
|
|
|
|
|
|
|
|
* Sun Apr 07 13:12:51 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.28.0-1
|
2019-04-07 11:14:24 +00:00
|
|
|
- Initial package
|