From f06d2dc358e3aa0bfd84b9ec78201bdd981946db Mon Sep 17 00:00:00 2001 From: Frédéric Pierret (fepitre) Date: Aug 18 2020 12:49:17 +0000 Subject: [PATCH 1/2] spec: add bcond for check Signed-off-by: Frédéric Pierret (fepitre) --- diff --git a/SPECS/pycairo.spec b/SPECS/pycairo.spec index be0c339..2c89074 100644 --- a/SPECS/pycairo.spec +++ b/SPECS/pycairo.spec @@ -1,3 +1,5 @@ +%bcond_without tests + Name: pycairo Version: 1.16.3 Release: 6%{?dist} @@ -10,7 +12,9 @@ Source0: https://github.com/pygobject/pycairo/releases/download/v%{version}/pyca BuildRequires: cairo-devel BuildRequires: pkgconfig BuildRequires: python3-devel +%if %{with tests} BuildRequires: python3-pytest +%endif %description Python bindings for the cairo library. @@ -40,8 +44,10 @@ libraries so that they interoperate with py3cairo. %install %py3_install +%if %{with tests} %check %{__python3} setup.py test +%endif %files -n python3-cairo %license COPYING* From 4b22a71ccdb0e16d1cdbaea1a1d5f4f9b313c1ed Mon Sep 17 00:00:00 2001 From: Frédéric Pierret (fepitre) Date: Aug 18 2020 12:49:20 +0000 Subject: [PATCH 2/2] spec: replace hardcoded python3 Signed-off-by: Frédéric Pierret (fepitre) --- diff --git a/SPECS/pycairo.spec b/SPECS/pycairo.spec index 2c89074..46ad357 100644 --- a/SPECS/pycairo.spec +++ b/SPECS/pycairo.spec @@ -11,27 +11,27 @@ Source0: https://github.com/pygobject/pycairo/releases/download/v%{version}/pyca BuildRequires: cairo-devel BuildRequires: pkgconfig -BuildRequires: python3-devel +BuildRequires: python%{python3_pkgversion}-devel %if %{with tests} -BuildRequires: python3-pytest +BuildRequires: python%{python3_pkgversion}-pytest %endif %description Python bindings for the cairo library. -%package -n python3-cairo +%package -n python%{python3_pkgversion}-cairo Summary: Python 3 bindings for the cairo library -%{?python_provide:%python_provide python3-cairo} +%{?python_provide:%python_provide python%{python3_pkgversion}-cairo} -%description -n python3-cairo +%description -n python%{python3_pkgversion}-cairo Python 3 bindings for the cairo library. -%package -n python3-cairo-devel +%package -n python%{python3_pkgversion}-cairo-devel Summary: Libraries and headers for py3cairo -Requires: python3-cairo%{?_isa} = %{version}-%{release} -Requires: python3-devel +Requires: python%{python3_pkgversion}-cairo%{?_isa} = %{version}-%{release} +Requires: python%{python3_pkgversion}-devel -%description -n python3-cairo-devel +%description -n python%{python3_pkgversion}-cairo-devel This package contains files required to build wrappers for cairo add-on libraries so that they interoperate with py3cairo. @@ -49,12 +49,12 @@ libraries so that they interoperate with py3cairo. %{__python3} setup.py test %endif -%files -n python3-cairo +%files -n python%{python3_pkgversion}-cairo %license COPYING* %{python3_sitearch}/cairo/ %{python3_sitearch}/pycairo*.egg-info -%files -n python3-cairo-devel +%files -n python%{python3_pkgversion}-cairo-devel %dir %{_includedir}/pycairo %{_includedir}/pycairo/py3cairo.h %{_libdir}/pkgconfig/py3cairo.pc