!13 Upgrade to latest release [python-cairocffi -> 1.5.0]

From: @wubijie123 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
This commit is contained in:
openeuler-ci-bot 2023-04-14 06:17:37 +00:00 committed by Gitee
commit 4109780c40
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 93 additions and 40 deletions

Binary file not shown.

BIN
cairocffi-1.5.0.tar.gz Normal file

Binary file not shown.

View File

@ -1,27 +1,13 @@
%global srcname cairocffi
Name: python-cairocffi
Version: 1.4.0
Release: 1
Summary: cffi-based cairo bindings for Python
License: BSD-3-Clause
URL: https://pypi.python.org/pypi/cairocffi/
Source0: https://files.pythonhosted.org/packages/source/c/cairocffi/cairocffi-1.4.0.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-cffi >= 1.1.0
BuildRequires: python3-pytest
BuildRequires: python3-pytest-cov
BuildRequires: python3-pytest-runner
BuildRequires: python3-xcffib >= 0.3.2
BuildRequires: cairo-devel
# required to run the test suite
BuildRequires: python3-numpy
BuildRequires: gdk-pixbuf2
BuildRequires: gdk-pixbuf2-modules
BuildRequires: xorg-x11-server-Xvfb
%global _empty_manifest_terminate_build 0
Name: python-cairocffi
Version: 1.5.0
Release: 1
Summary: cffi-based cairo bindings for Python
License: BSD-3-Clause
URL: https://pypi.python.org/pypi/cairocffi/
Source0: https://files.pythonhosted.org/packages/28/d6/59ed0aa7f642142db493744c909a59a45e7350277d8987ccfc56cc5244d9/cairocffi-1.5.0.tar.gz
Source1: setup.py
BuildArch: noarch
%global _description\
cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of\
@ -32,39 +18,84 @@ image buffers, PNG, PostScript, PDF, and SVG file output.
%description %_description
%package -n python3-cairocffi
Summary: cffi-based cairo bindings for Python
Summary: cffi-based cairo bindings for Python
Provides: python-cairocffi = %{version}-%{release}
Provides: python%{python3_pkgversion}dist(cairocffi[xcb]) = %{version}
Provides: python%{python3_version}dist(cairocffi[xcb]) = %{version}
%{?python_provide:%python_provide python3-cairocffi}
Requires: python3-cffi
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}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-cffi
BuildRequires: python3-pytest
BuildRequires: python3-pytest-cov
BuildRequires: python3-pytest-runner
BuildRequires: python3-xcffib
BuildRequires: cairo-devel
BuildRequires: python3-numpy
BuildRequires: gdk-pixbuf2
BuildRequires: gdk-pixbuf2-modules
BuildRequires: xorg-x11-server-Xvfb
%description -n python3-cairocffi
%package help
Summary: Development documents and examples for cairocffi
Provides: python3-cairocffi-doc
%description help
%description -n python3-cairocffi %_description
%prep
%autosetup -n cairocffi-%{version} -p1
rm -rf %{srcname}.egg-info
%autosetup -n cairocffi-%{version}
cp %{SOURCE1} ./
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
if [ -f README.rst ]; then cp -af README.rst %{buildroot}/%{_pkgdocdir}; fi
if [ -f README.md ]; then cp -af README.md %{buildroot}/%{_pkgdocdir}; fi
if [ -f README.txt ]; then cp -af README.txt %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%check
%py3_build
%files -n python3-cairocffi -f filelist.lst
%dir %{python3_sitelib}/*
%files -n python3-cairocffi
%doc README.rst
%{python3_sitelib}/%{srcname}/
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Wed Apr 12 2023 wubijie <wubijie@kylinos.cn> - 1.5.0-1
- Update package to version 1.5.0
* Tue Nov 8 2022 hkgy <kaguyahatu@outlook.com> - 1.4.0-1
- Upgrade to v1.4.0
@ -76,3 +107,4 @@ rm -rf %{srcname}.egg-info
* Fri Feb 19 2021 Ge Wang<wangge20@huawei.com> - 1.2.0-1
- Init package

21
setup.py Normal file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env python
import sys
from setuptools import setup
if sys.version_info.major < 3:
raise RuntimeError(
'cairocffi does not support Python 2.x anymore. '
'Please use Python 3 or install an older version of cairocffi.')
setup(
cffi_modules=[
'cairocffi/ffi_build.py:ffi',
'cairocffi/ffi_build.py:ffi_pixbuf'],
name = "cairocffi", # name
version = "1.5.0", # version
)