#1 Fix hardcoded python3 and allow to skip tests
Opened a year ago by fepitre. Modified 7 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



  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 @@ 




+ %if %{with tests}


  %{__python3} setup.py test

+ %endif


- %files -n python3-cairo

+ %files -n python%{python3_pkgversion}-cairo

  %license COPYING*




- %files -n python3-cairo-devel

+ %files -n python%{python3_pkgversion}-cairo-devel

  %dir %{_includedir}/pycairo



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.

Thanks for the potential contribution @fepitre. Sorry for the delay in response, we're still working out the kinks with our contribution process. CentOS Stream 8 is still built "inside out". What I mean by that is that there is still an internal dist-git and build system where RHEL builds are done, before being exported automatically to this dist-git to be built in the CentOS build system. This means that we can't merge this pull request directly. We can however use it to demonstrate changes and generate a patch file that can be applied to the internal dist-git by RHEL maintainers, if they decide to accept the change. To get their attention, would you mind filing a bugzilla describing this change in detail? This link will pre-populate the necessary fields. Please also link to this pull request in that bugzilla.


This will work much better in CentOS Stream 9, as we're moving to having the RHEL maintainers work directly in a public dist-git so that can merge pull requests from contributors.