Drop python3 conditionals
They don't make much sense any more now that we are only building for Python 3 and Python 2 support is dropped.
This commit is contained in:
parent
d645e78b8c
commit
def5f5a227
@ -1,7 +1,3 @@
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
%global pkgname pygit2
|
||||
|
||||
Name: python-%{pkgname}
|
||||
@ -21,7 +17,6 @@ pygit2 is a set of Python bindings to the libgit2 library, which implements
|
||||
the core of Git.
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-%{pkgname}
|
||||
Summary: Python 3.x bindings for libgit2
|
||||
%{?python_provide:%python_provide python3-%{pkgname}}
|
||||
@ -38,7 +33,6 @@ pygit2 is a set of Python bindings to the libgit2 library, which implements
|
||||
the core of Git.
|
||||
|
||||
Python 3 version.
|
||||
%endif
|
||||
|
||||
|
||||
%package doc
|
||||
@ -55,18 +49,13 @@ Documentation for %{name}.
|
||||
|
||||
|
||||
%build
|
||||
make -C docs html
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
make -C docs html
|
||||
|
||||
|
||||
%install
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%py3_install
|
||||
%endif
|
||||
|
||||
find %{_builddir} -name '.buildinfo' -delete
|
||||
|
||||
@ -78,24 +67,18 @@ find %{buildroot} -name '*.so' -exec chmod 755 {} ';'
|
||||
# https://github.com/libgit2/pygit2/issues/811
|
||||
# https://github.com/libgit2/pygit2/issues/812
|
||||
%ifarch aarch64 ppc64 s390x
|
||||
%if 0%{?with_python3}
|
||||
PYTHONPATH=%{buildroot}%{python3_sitearch} pytest-3 || :
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?with_python3}
|
||||
PYTHONPATH=%{buildroot}%{python3_sitearch} pytest-3
|
||||
%endif
|
||||
%endif
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-%{pkgname}
|
||||
%doc README.rst TODO.txt
|
||||
%license COPYING
|
||||
%{python3_sitearch}/%{pkgname}-*.egg-info/
|
||||
%{python3_sitearch}/%{pkgname}/
|
||||
%{python3_sitearch}/_%{pkgname}.*.so
|
||||
%endif
|
||||
|
||||
%files doc
|
||||
%license COPYING
|
||||
|
Loading…
Reference in New Issue
Block a user