[packages/python3-cairocffi] - up to 1.7.1
baggins
baggins at pld-linux.org
Mon Apr 14 02:32:31 CEST 2025
commit 51dae6c8553aa6c883a4ed7e798a3099c2fc696e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Mon Apr 14 02:41:09 2025 +0200
- up to 1.7.1
python3-cairocffi.spec | 33 +++++++++++++++++++--------------
1 file changed, 19 insertions(+), 14 deletions(-)
---
diff --git a/python3-cairocffi.spec b/python3-cairocffi.spec
index 8a31fa1..a2f25f8 100644
--- a/python3-cairocffi.spec
+++ b/python3-cairocffi.spec
@@ -6,15 +6,16 @@
%define module cairocffi
Summary: cffi-based cairo bindings for Python
Name: python3-%{module}
-Version: 1.2.0
-Release: 5
+Version: 1.7.1
+Release: 1
License: BSD
Group: Libraries/Python
Source0: https://github.com/Kozea/cairocffi/archive/v%{version}/%{module}-%{version}.tar.gz
-# Source0-md5: 37f8131cfab841dbec3a17f317d9f28b
+# Source0-md5: 90ca42f574320c8d95e9e30c1f62426a
URL: https://github.com/Kozea/cairocffi
BuildRequires: python3-modules >= 1:3.7
-BuildRequires: python3-setuptools
+BuildRequires: python3-build
+BuildRequires: python3-installer
%if %{with tests}
BuildRequires: python3-numpy
%endif
@@ -48,17 +49,25 @@ Dokumentacja API modułu Pythona %{module}.
%setup -q -n %{module}-%{version}
%build
-%py3_build %{?with_tests:test}
+%py3_build_pyproject
+
+%if %{with tests}
+%{__python3} -m zipfile -e build-3/*.whl build-3-test
+# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty)
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS= \
+%{__python3} -m pytest -o pythonpath="$PWD/build-3-test" tests
+%endif
%if %{with doc}
-sphinx-build-3 docs html
-rm -rf html/_sources
+PYTHONPATH=$PWD \
+sphinx-build-3 -b html docs docs/_build/html
%endif
%install
rm -rf $RPM_BUILD_ROOT
-%py3_install
+%py3_install_pyproject
%clean
rm -rf $RPM_BUILD_ROOT
@@ -67,16 +76,12 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc NEWS.rst README.rst
%dir %{py3_sitescriptdir}/%{module}
-%{py3_sitescriptdir}/%{module}/VERSION
%{py3_sitescriptdir}/%{module}/*.py
%{py3_sitescriptdir}/%{module}/__pycache__
-%dir %{py3_sitescriptdir}/%{module}/_generated
-%{py3_sitescriptdir}/%{module}/_generated/*.py
-%{py3_sitescriptdir}/%{module}/_generated/__pycache__
-%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%{py3_sitescriptdir}/%{module}-%{version}.dist-info
%if %{with doc}
%files apidocs
%defattr(644,root,root,755)
-%doc html/*
+%doc docs/_build/html/*
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-cairocffi.git/commitdiff/51dae6c8553aa6c883a4ed7e798a3099c2fc696e
More information about the pld-cvs-commit
mailing list