From def5f5a22725ccc699d1b52106f83f36c596c660 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Jan 29 2019 11:35:18 +0000 Subject: 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. --- diff --git a/python-pygit2.spec b/python-pygit2.spec index 8efd42d..d3a914c 100644 --- a/python-pygit2.spec +++ b/python-pygit2.spec @@ -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} +%install %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