#1 Fix hardcoded python3 and allow to skip tests
Opened 3 months ago by fepitre. Modified 3 months ago
rpms/ fepitre/pycairo python3  into  c8

file modified
+17 -11

@@ -1,3 +1,5 @@ 

+ %bcond_without tests

+ 

  Name: pycairo

  Version: 1.16.3

  Release: 6%{?dist}

@@ -9,25 +11,27 @@ 

  

  BuildRequires: cairo-devel

  BuildRequires: pkgconfig

- BuildRequires: python3-devel

- BuildRequires: python3-pytest

+ BuildRequires: python%{python3_pkgversion}-devel

+ %if %{with tests}

+ 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.

  

@@ -40,15 +44,17 @@ 

  %install

  %py3_install

  

+ %if %{with tests}

  %check

  %{__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

It's for building it for CentOS 8 with python38 version. I intend to build a COPR repo with more python38 packages than the few ones provided. Preliminary repo is here: https://copr.fedorainfracloud.org/coprs/fepitre/epel-8-python38/. I've added also the possibility to ignore tests if needed. As most of the current built packages, almost all of the same PR as here have been merged in other Fedora repositories when no EPEL branch was available or up to date.

Metadata