[packages/python3-skia-pathops] - python-skia-pathops.spec updated to 0.7.2 for python 3.7+ - added build patch to use system ninja

qboosh qboosh at pld-linux.org
Sun Dec 19 08:38:13 CET 2021


commit 89137321b7e65e20194660468a38f5f8cc6ac6e4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Dec 19 08:38:48 2021 +0100

    - python-skia-pathops.spec updated to 0.7.2 for python 3.7+
    - added build patch to use system ninja and gn

 python-skia-pathops.spec         | 136 ---------------------------------------
 python3-skia-pathops-build.patch |  12 ++++
 python3-skia-pathops.spec        |  76 ++++++++++++++++++++++
 3 files changed, 88 insertions(+), 136 deletions(-)
---
diff --git a/python-skia-pathops.spec b/python-skia-pathops.spec
deleted file mode 100644
index 2e2cd1f..0000000
--- a/python-skia-pathops.spec
+++ /dev/null
@@ -1,136 +0,0 @@
-#
-# Conditional build:
-%bcond_without	tests	# unit tests
-%bcond_without	python2 # CPython 2.x module
-%bcond_with	python3 # CPython 3.x module (built from python3-skia-pathops.spec)
-
-Summary:	Boolean operations on paths using the Skia library
-Summary(pl.UTF-8):	Operacje logiczne na ścieżkach przy użyciu biblioteki Skia
-Name:		python-skia-pathops
-# keep 0.2.0.x here for python2 support
-Version:	0.2.0.post2
-Release:	1
-License:	BSD
-Group:		Libraries/Python
-#Source0Download: https://pypi.org/simple/skia-pathops/
-#Source0:	https://files.pythonhosted.org/packages/source/s/skia-pathops/skia-pathops-%{version}.zip
-Source0:	https://files.pythonhosted.org/packages/10/16/a7f05773cdd9bbff6fd322a941e969f1b5fd525c99f7f173513fdd9b8576/skia-pathops-%{version}.zip
-# Source0-md5:	83c3615f47555ca30619d6dc354f0c91
-URL:		https://pypi.org/project/skia-pathops/
-BuildRequires:	libstdc++-devel >= 6:4.3
-%if %{with python2}
-BuildRequires:	python-Cython >= 0.28.4
-BuildRequires:	python-devel >= 1:2.7
-BuildRequires:	python-setuptools
-%if %{with tests}
-BuildRequires:	python-pytest >= 3.0.0
-BuildRequires:	python-pytest-cython
-#BuildRequires:	python-pytest-randomly >= 1.2.3
-#BuildRequires:	python-pytest-xdist >= 1.22.2
-%endif
-%endif
-%if %{with python3}
-BuildRequires:	python3-Cython >= 0.28.4
-BuildRequires:	python3-devel >= 1:3.6
-BuildRequires:	python3-setuptools
-%if %{with tests}
-BuildRequires:	python3-pytest >= 3.0.0
-BuildRequires:	python3-pytest-cython
-#BuildRequires:	python3-pytest-randomly >= 1.2.3
-#BuildRequires:	python3-pytest-xdist >= 1.22.2
-%endif
-%endif
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
-BuildRequires:	unzip
-Requires:	python-modules >= 1:2.7
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-Python bindings for the Google Skia library's Path Ops module,
-performing boolean operations on paths (intersection, union,
-difference, xor).
-
-%description -l pl.UTF-8
-Wiązania Pythona do modułu Path Ops biblioteki Google Skia,
-wykonującego operacje logiczne na ścieżkach (przecięcia, sumy,
-różnice, różnice symetryczne).
-
-%package -n python3-skia-pathops
-Summary:	Boolean operations on paths using the Skia library
-Summary(pl.UTF-8):	Operacje logiczne na ścieżkach przy użyciu biblioteki Skia
-Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.6
-
-%description -n python3-skia-pathops
-Python bindings for the Google Skia library's Path Ops module,
-performing boolean operations on paths (intersection, union,
-difference, xor).
-
-%description -n python3-skia-pathops -l pl.UTF-8
-Wiązania Pythona do modułu Path Ops biblioteki Google Skia,
-wykonującego operacje logiczne na ścieżkach (przecięcia, sumy,
-różnice, różnice symetryczne).
-
-%prep
-%setup -q -n skia-pathops-%{version}
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTEST_PLUGINS="pytest_cython.plugin" \
-PYTHONPATH=$(echo $(pwd)/build-2/lib.*) \
-%{__python} -m pytest tests
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTEST_PLUGINS="pytest_cython.plugin" \
-PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
-%{__python3} -m pytest tests
-%endif
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
-%py3_install
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc LICENSE README.md
-%dir %{py_sitedir}/pathops
-%{py_sitedir}/pathops/*.py[co]
-%attr(755,root,root) %{py_sitedir}/pathops/_pathops.so
-%{py_sitedir}/skia_pathops-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-skia-pathops
-%defattr(644,root,root,755)
-%doc LICENSE README.md
-%dir %{py3_sitedir}/pathops
-%{py3_sitedir}/pathops/*.py
-%attr(755,root,root) %{py3_sitedir}/pathops/_pathops.cpython-*.so
-%{py3_sitedir}/pathops/__pycache__
-%{py3_sitedir}/skia_pathops-%{version}-py*.egg-info
-%endif
diff --git a/python3-skia-pathops.spec b/python3-skia-pathops.spec
new file mode 100644
index 0000000..ee3d964
--- /dev/null
+++ b/python3-skia-pathops.spec
@@ -0,0 +1,76 @@
+# TODO: system skia? (BUILD_SKIA_FROM_SOURCE=0, BR: skia.pc)
+#
+# Conditional build:
+%bcond_without	tests	# unit tests
+
+Summary:	Boolean operations on paths using the Skia library
+Summary(pl.UTF-8):	Operacje logiczne na ścieżkach przy użyciu biblioteki Skia
+Name:		python3-skia-pathops
+Version:	0.7.2
+Release:	1
+License:	BSD
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/skia-pathops/
+#Source0:	https://files.pythonhosted.org/packages/source/s/skia-pathops/skia-pathops-%{version}.zip
+Source0:	https://files.pythonhosted.org/packages/60/4e/73eb87157e23169a901f16773ccd7dd44b8394346beeaaab7dcadb187518/skia-pathops-%{version}.zip
+# Source0-md5:	c4455e40f408c1c5931d72dc9f4f2005
+Patch0:		%{name}-build.patch
+URL:		https://pypi.org/project/skia-pathops/
+BuildRequires:	gn
+BuildRequires:	libstdc++-devel >= 6:5
+BuildRequires:	ninja
+BuildRequires:	python3-Cython >= 0.28.4
+BuildRequires:	python3-devel >= 1:3.7
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-pytest >= 3.0.0
+BuildRequires:	python3-pytest-cython
+#BuildRequires:	python3-pytest-randomly >= 1.2.3
+#BuildRequires:	python3-pytest-xdist >= 1.22.2
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+BuildRequires:	unzip
+Requires:	python3-modules >= 1:3.7
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Python bindings for the Google Skia library's Path Ops module,
+performing boolean operations on paths (intersection, union,
+difference, xor).
+
+%description -l pl.UTF-8
+Wiązania Pythona do modułu Path Ops biblioteki Google Skia,
+wykonującego operacje logiczne na ścieżkach (przecięcia, sumy,
+różnice, różnice symetryczne).
+
+%prep
+%setup -q -n skia-pathops-%{version}
+%patch0 -p1
+
+%build
+%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS="pytest_cython.plugin" \
+PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
+%{__python3} -m pytest tests
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.md
+%dir %{py3_sitedir}/pathops
+%{py3_sitedir}/pathops/*.py
+%attr(755,root,root) %{py3_sitedir}/pathops/_pathops.cpython-*.so
+%{py3_sitedir}/pathops/__pycache__
+%{py3_sitedir}/skia_pathops-%{version}-py*.egg-info
diff --git a/python3-skia-pathops-build.patch b/python3-skia-pathops-build.patch
new file mode 100644
index 0000000..fb2b3c0
--- /dev/null
+++ b/python3-skia-pathops-build.patch
@@ -0,0 +1,12 @@
+--- skia-pathops-0.7.2/setup.py.orig	2021-11-30 16:58:56.000000000 +0100
++++ skia-pathops-0.7.2/setup.py	2021-12-19 08:10:42.361396989 +0100
+@@ -250,6 +250,9 @@ def build_skia(build_base):
+     build_dir = os.path.join(build_base, skia_dir)
+     build_skia_py = os.path.join(skia_builder_dir, "build_skia.py")
+     build_cmd = [sys.executable, build_skia_py, build_dir]
++    build_cmd.append("--no-virtualenv")
++    build_cmd.append("--no-fetch-gn")
++    build_cmd += ["--gn-path", "/usr/bin/gn"]
+ 
+     if inside_sdist:
+         build_cmd.append("--no-sync-deps")
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-skia-pathops.git/commitdiff/89137321b7e65e20194660468a38f5f8cc6ac6e4



More information about the pld-cvs-commit mailing list