2014-08-26 13:24:32 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-cairocffi
|
|
|
|
#
|
2024-04-29 13:25:06 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2014-08-26 13:24:32 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2020-10-30 12:50:47 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-08-26 13:24:32 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-04-21 14:50:27 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2014-08-26 13:24:32 +00:00
|
|
|
Name: python-cairocffi
|
2024-06-20 13:17:58 +00:00
|
|
|
Version: 1.7.1
|
2014-08-26 13:24:32 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Python cairo bindings based on cffi
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Languages/Python
|
2019-07-31 12:43:56 +00:00
|
|
|
URL: https://github.com/Kozea/cairocffi
|
2017-04-12 19:02:12 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/c/cairocffi/cairocffi-%{version}.tar.gz
|
2023-05-05 09:48:23 +00:00
|
|
|
# avoid pikepdf in Ring1, skipping the pikepdf related tests
|
|
|
|
Patch1: skip-pikepdf.patch
|
2024-04-29 13:25:06 +00:00
|
|
|
BuildRequires: %{python_module base >= 3.8}
|
2022-08-20 06:54:22 +00:00
|
|
|
BuildRequires: %{python_module cffi >= 1.1.0}
|
2023-10-19 14:28:09 +00:00
|
|
|
BuildRequires: %{python_module flit-core}
|
2023-05-05 09:48:23 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
BuildRequires: %{python_module wheel}
|
2023-10-19 14:28:09 +00:00
|
|
|
BuildRequires: %{python_module xcffib >= 0.4.0}
|
2022-08-07 20:35:47 +00:00
|
|
|
BuildRequires: cairo
|
|
|
|
Requires: cairo
|
|
|
|
Requires: python-cffi >= 1.1.0
|
|
|
|
Requires: python-xcffib >= 0.3.2
|
|
|
|
BuildArch: noarch
|
|
|
|
# SECTION test requirements
|
2022-08-20 06:54:22 +00:00
|
|
|
BuildRequires: %{python_module numpy}
|
2020-12-08 09:56:38 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2019-07-31 12:43:56 +00:00
|
|
|
BuildRequires: dejavu-fonts
|
2019-01-25 11:11:14 +00:00
|
|
|
BuildRequires: fdupes
|
2014-09-10 09:35:32 +00:00
|
|
|
BuildRequires: gdk-pixbuf
|
2017-04-12 17:45:02 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2022-08-07 20:35:47 +00:00
|
|
|
BuildRequires: xvfb-run
|
|
|
|
# /SECTION
|
2017-04-12 17:45:02 +00:00
|
|
|
%python_subpackages
|
2014-08-26 13:24:32 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
cairocffi is a CFFI-based drop-in replacement for Pycairo,
|
|
|
|
a set of Python bindings and object-oriented API for cairo.
|
|
|
|
Cairo is a 2D vector graphics library with support for multiple backends
|
|
|
|
including image buffers, PNG, PostScript, PDF, and SVG file output.
|
|
|
|
|
2014-08-27 11:26:50 +00:00
|
|
|
%package pixbuf
|
|
|
|
Summary: Python cairo bindings based on cffi - pixbuf image loader
|
2015-04-28 21:30:15 +00:00
|
|
|
Group: Development/Languages/Python
|
2014-08-27 11:26:50 +00:00
|
|
|
Requires: %{name} = %{version}
|
2015-04-28 21:30:15 +00:00
|
|
|
Requires: gdk-pixbuf
|
2014-08-27 11:26:50 +00:00
|
|
|
|
|
|
|
%description pixbuf
|
|
|
|
cairocffi is a CFFI-based drop-in replacement for Pycairo,
|
|
|
|
a set of Python bindings and object-oriented API for cairo.
|
|
|
|
Cairo is a 2D vector graphics library with support for multiple backends
|
|
|
|
including image buffers, PNG, PostScript, PDF, and SVG file output.
|
|
|
|
|
|
|
|
This package provides the optional gdk-pixbuf image loader module.
|
|
|
|
|
2014-08-26 13:24:32 +00:00
|
|
|
%prep
|
2023-05-05 09:48:23 +00:00
|
|
|
%autosetup -p1 -n cairocffi-%{version}
|
2022-08-07 20:35:47 +00:00
|
|
|
|
2014-08-26 13:24:32 +00:00
|
|
|
%build
|
2023-05-05 09:48:23 +00:00
|
|
|
%pyproject_wheel
|
2014-08-26 13:24:32 +00:00
|
|
|
|
|
|
|
%install
|
2023-05-05 09:48:23 +00:00
|
|
|
%pyproject_install
|
2022-01-04 21:19:19 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2014-08-26 13:24:32 +00:00
|
|
|
|
2019-07-31 12:43:56 +00:00
|
|
|
%check
|
2022-09-29 09:59:08 +00:00
|
|
|
# Switch off test_xcb_window (gh#Kozea/cairocffi#203)
|
2023-10-19 14:28:09 +00:00
|
|
|
%python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}" xvfb-run --server-args="-screen 0 1280x1024x16" $python -m pytest
|
2019-07-31 12:43:56 +00:00
|
|
|
|
2018-01-27 10:36:37 +00:00
|
|
|
%files %{python_files}
|
2018-07-13 17:56:25 +00:00
|
|
|
%license LICENSE
|
2019-07-31 12:43:56 +00:00
|
|
|
%doc README.rst
|
2022-08-20 06:54:22 +00:00
|
|
|
%{python_sitelib}/cairocffi-%{version}*-info
|
|
|
|
%{python_sitelib}/cairocffi
|
2014-08-27 11:26:50 +00:00
|
|
|
%exclude %{python_sitelib}/cairocffi/pixbuf.py*
|
2017-04-12 17:45:02 +00:00
|
|
|
%ifpycache
|
|
|
|
%exclude %{python_sitelib}/cairocffi/__pycache__/pixbuf.*
|
|
|
|
%endif
|
2014-08-27 11:26:50 +00:00
|
|
|
|
2017-04-12 17:45:02 +00:00
|
|
|
%files %{python_files pixbuf}
|
2014-08-27 11:26:50 +00:00
|
|
|
%{python_sitelib}/cairocffi/pixbuf.py*
|
2017-04-12 17:45:02 +00:00
|
|
|
%ifpycache
|
|
|
|
%{python_sitelib}/cairocffi/__pycache__/pixbuf.*
|
|
|
|
%endif
|
2014-08-26 13:24:32 +00:00
|
|
|
|
|
|
|
%changelog
|