Drop conditionals for RHEL
EPEL7 package has different BuildRequires, has couple of additional Requires and doesn't have subpackage named python2-pygit2. This makes it entirely pointless to keep nasty conditionals around (which are wrong anyway). Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
04e58c1379
commit
7af8458b9f
@ -1,7 +1,3 @@
|
|||||||
%if 0%{?fedora}
|
|
||||||
%global with_python3 1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%global pkgname pygit2
|
%global pkgname pygit2
|
||||||
|
|
||||||
Name: python-%{pkgname}
|
Name: python-%{pkgname}
|
||||||
@ -21,7 +17,6 @@ BuildRequires: openssl-devel
|
|||||||
pygit2 is a set of Python bindings to the libgit2 library, which implements
|
pygit2 is a set of Python bindings to the libgit2 library, which implements
|
||||||
the core of Git.
|
the core of Git.
|
||||||
|
|
||||||
|
|
||||||
%package -n python2-%{pkgname}
|
%package -n python2-%{pkgname}
|
||||||
Summary: Python 2.x bindings for libgit2
|
Summary: Python 2.x bindings for libgit2
|
||||||
%{?python_provide:%python_provide python2-%{pkgname}}
|
%{?python_provide:%python_provide python2-%{pkgname}}
|
||||||
@ -39,8 +34,6 @@ the core of Git.
|
|||||||
|
|
||||||
Python 2 version.
|
Python 2 version.
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%package -n python3-%{pkgname}
|
%package -n python3-%{pkgname}
|
||||||
Summary: Python 3.x bindings for libgit2
|
Summary: Python 3.x bindings for libgit2
|
||||||
%{?python_provide:%python_provide python3-%{pkgname}}
|
%{?python_provide:%python_provide python3-%{pkgname}}
|
||||||
@ -57,8 +50,6 @@ pygit2 is a set of Python bindings to the libgit2 library, which implements
|
|||||||
the core of Git.
|
the core of Git.
|
||||||
|
|
||||||
Python 3 version.
|
Python 3 version.
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for %{name}
|
Summary: Documentation for %{name}
|
||||||
@ -68,7 +59,6 @@ BuildRequires: %{_bindir}/sphinx-build
|
|||||||
%description doc
|
%description doc
|
||||||
Documentation for %{name}.
|
Documentation for %{name}.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{pkgname}-%{version} -p1
|
%autosetup -n %{pkgname}-%{version} -p1
|
||||||
|
|
||||||
@ -76,36 +66,23 @@ Documentation for %{name}.
|
|||||||
# https://github.com/libgit2/pygit2/issues/748
|
# https://github.com/libgit2/pygit2/issues/748
|
||||||
rm test/test_patch.py
|
rm test/test_patch.py
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
%py2_build
|
||||||
make -C docs html
|
make -C docs html
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%py3_build
|
%py3_build
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py2_install
|
%py2_install
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%py3_install
|
%py3_install
|
||||||
%endif
|
|
||||||
|
|
||||||
find %{_builddir} -name '.buildinfo' -delete
|
find %{_builddir} -name '.buildinfo' -delete
|
||||||
|
|
||||||
# Correct the permissions.
|
# Correct the permissions.
|
||||||
find %{buildroot} -name '*.so' -exec chmod 755 {} ';'
|
find %{buildroot} -name '*.so' -exec chmod 755 {} ';'
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__python2} setup.py test
|
%{__python2} setup.py test
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%{__python3} setup.py test
|
%{__python3} setup.py test
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%files -n python2-%{pkgname}
|
%files -n python2-%{pkgname}
|
||||||
%doc README.rst TODO.txt
|
%doc README.rst TODO.txt
|
||||||
@ -114,20 +91,17 @@ find %{buildroot} -name '*.so' -exec chmod 755 {} ';'
|
|||||||
%{python2_sitearch}/%{pkgname}
|
%{python2_sitearch}/%{pkgname}
|
||||||
%{python2_sitearch}/_%{pkgname}.so
|
%{python2_sitearch}/_%{pkgname}.so
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%files -n python3-%{pkgname}
|
%files -n python3-%{pkgname}
|
||||||
%doc README.rst TODO.txt
|
%doc README.rst TODO.txt
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{python3_sitearch}/%{pkgname}-%{version}-py%{python3_version}.egg-info
|
%{python3_sitearch}/%{pkgname}-%{version}-py%{python3_version}.egg-info
|
||||||
%{python3_sitearch}/%{pkgname}
|
%{python3_sitearch}/%{pkgname}
|
||||||
%{python3_sitearch}/_%{pkgname}.*.so
|
%{python3_sitearch}/_%{pkgname}.*.so
|
||||||
%endif
|
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc docs/_build/html/*
|
%doc docs/_build/html/*
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.4-3
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.4-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
Loading…
Reference in New Issue
Block a user