#4 Provide cairocffi[xcb] from the python3-cairocffi package
Merged 2 years ago by fschwarz. Opened 2 years ago by churchyard.
rpms/ churchyard/python-cairocffi provide_extras  into  master

file modified
+8 -1
@@ -2,7 +2,7 @@ 


  Name:           python-cairocffi

  Version:        1.1.0

- Release:        3%{?dist}

+ Release:        4%{?dist}

  Summary:        cffi-based cairo bindings for Python

  License:        BSD

  URL:            https://pypi.python.org/pypi/cairocffi/
@@ -37,6 +37,10 @@ 

  Requires:       cairo

  # required by cairocffi.pixbuf

  Requires:       python3-xcffib >= 0.3.2

+ # Provide the cairocffi[xcb] extras, because there is no reasonable split

+ # Be aware that %%version is not converted to the Pythonistic version here!

+ Provides:       python%{python3_pkgversion}dist(cairocffi[xcb]) = %{version}

+ Provides:       python%{python3_version}dist(cairocffi[xcb]) = %{version}

  %{?python_provide:%python_provide python3-cairocffi}


  %description -n python3-cairocffi %_description
@@ -62,6 +66,9 @@ 




+ * Tue Jul 21 2020 Miro Hrončok <mhroncok@redhat.com> - 1.1.0-4

+ - Provide cairocffi[xcb] from the python3-cairocffi package


  * Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.1.0-3

  - Rebuilt for Python 3.9


The "xcb" extra can be installed via pip, but when the package is built,
it is either built with it, or without it.
Since we BuildRequire python3-xcffib, the package is built with the extra.
Hence, having a separate subpackage for cairocffi[xcb] does not make sense.

However, other packages can require python3.Xdist(cairocffi[xcb]),
currently, qtile 0.14.2 requires python3.Xdist(cairocffi[xcb]) >= 0.9.
For that, we manually add the provides to the "main" python3-cairocffi package.

Beware that the version of the provide is naïve: it is %{version}.
The automatic python3dist() provides convert the version to a more Python
compatible format (such as stripping the trailing .0),
but mimicking that would be currently tedious.
If this prove problematic in the future, a mechanism can be implemented to
convert the version.

As a reference, see the discussion in https://src.fedoraproject.org/rpms/python-cairocffi/pull-request/2

Pull-Request has been merged by fschwarz

2 years ago