1dc7dc4
%global srcname cairocffi
1dc7dc4
59a8e4c
Name:           python-cairocffi
4414ff6
Version:        1.7.0
e7b48d0
Release:        %autorelease
59a8e4c
Summary:        cffi-based cairo bindings for Python
04d26ec
License:        BSD-3-Clause
59a8e4c
URL:            https://pypi.python.org/pypi/cairocffi/
1dc7dc4
Source0:        %{pypi_source}
1dc7dc4
59a8e4c
BuildArch:      noarch
59a8e4c
32fca08
BuildRequires:  python3-devel
0cc7022
# required to run the test suite
0cc7022
BuildRequires:  gdk-pixbuf2
0cc7022
BuildRequires:  gdk-pixbuf2-modules
0d526c6
BuildRequires:  xorg-x11-server-Xvfb
59a8e4c
e535403
%global _description\
e535403
cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of\
e535403
Python bindings and object-oriented API for cairo.  Cairo is a 2D\
e535403
vector graphics library with support for multiple backends including\
e535403
image buffers, PNG, PostScript, PDF, and SVG file output.
e535403
e535403
%description %_description
e535403
59a8e4c
%package -n python3-cairocffi
59a8e4c
Summary:        cffi-based cairo bindings for Python
a8677ba
Requires:       cairo
1dc7dc4
# required by cairocffi.pixbuf
e5cccd5
Requires:       gdk-pixbuf2
e5cccd5
Requires:       glib2
e5cccd5
Requires:       gtk3
59a8e4c
e535403
%description -n python3-cairocffi %_description
59a8e4c
04d26ec
%pyproject_extras_subpkg -n python3-cairocffi xcb
04d26ec
59a8e4c
%prep
0d526c6
%autosetup -n cairocffi-%{version} -p1
7924d36
sed -i -e "s/, 'flake8'//" -e "s/, 'isort'//" pyproject.toml
04d26ec
04d26ec
%generate_buildrequires
04d26ec
%pyproject_buildrequires -x test
59a8e4c
59a8e4c
%build
04d26ec
%pyproject_wheel
59a8e4c
59a8e4c
%install
04d26ec
%pyproject_install
04d26ec
%pyproject_save_files cairocffi
59a8e4c
0cc7022
%check
0d526c6
# test_xcb.py needs a display
87e67a9
%global __pytest xvfb-run /usr/bin/pytest
87e67a9
%pytest -v --pyargs cairocffi
0cc7022
0cc7022
04d26ec
%files -n python3-cairocffi -f %{pyproject_files}
1dc7dc4
%doc README.rst
59a8e4c
59a8e4c
%changelog
e7b48d0
%autochangelog