forked from pool/python-opengl-accelerate
Accepting request 1273248 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1273248 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-opengl-accelerate?expand=0&rev=15
This commit is contained in:
54
112.patch
54
112.patch
@@ -1,54 +0,0 @@
|
||||
From fbe0fab7947788039cb4fbc9a5a1ea65a0c0e15b Mon Sep 17 00:00:00 2001
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Fri, 5 Jan 2024 08:48:12 +0100
|
||||
Subject: [PATCH 1/2] accelerate: Fix type of PyArray_FillWithScalar
|
||||
|
||||
The first argument is of type PyArrayObject, not PyObject.
|
||||
---
|
||||
accelerate/src/numpy_formathandler.pyx | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/accelerate/src/numpy_formathandler.pyx b/accelerate/src/numpy_formathandler.pyx
|
||||
index 0c01d78e..10813694 100644
|
||||
--- a/accelerate/src/numpy_formathandler.pyx
|
||||
+++ b/accelerate/src/numpy_formathandler.pyx
|
||||
@@ -21,7 +21,7 @@ cdef extern from "numpy/arrayobject.h":
|
||||
int PyArray_ISCARRAY_RO( np.ndarray instance )
|
||||
cdef np.ndarray PyArray_Zeros(int nd, np.Py_intptr_t* dims, np.dtype, int fortran)
|
||||
cdef np.ndarray PyArray_EnsureArray(object)
|
||||
- cdef int PyArray_FillWithScalar(object, object)
|
||||
+ cdef int PyArray_FillWithScalar(np.ndarray, object)
|
||||
cdef void import_array()
|
||||
cdef void* PyArray_DATA( np.ndarray )
|
||||
cdef int PyArray_NDIM( np.ndarray )
|
||||
|
||||
From f62dd58a5437c628d3ff3e626d4507811ef2127b Mon Sep 17 00:00:00 2001
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Fri, 5 Jan 2024 08:48:43 +0100
|
||||
Subject: [PATCH 2/2] accelerate: Use recommended way to integrate NumPy with
|
||||
Cython
|
||||
|
||||
This approach follows
|
||||
<https://cython.readthedocs.io/en/latest/src/tutorial/numpy.html#adding-types>.
|
||||
---
|
||||
accelerate/src/numpy_formathandler.pyx | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/accelerate/src/numpy_formathandler.pyx b/accelerate/src/numpy_formathandler.pyx
|
||||
index 10813694..47dacaa0 100644
|
||||
--- a/accelerate/src/numpy_formathandler.pyx
|
||||
+++ b/accelerate/src/numpy_formathandler.pyx
|
||||
@@ -22,7 +22,6 @@ cdef extern from "numpy/arrayobject.h":
|
||||
cdef np.ndarray PyArray_Zeros(int nd, np.Py_intptr_t* dims, np.dtype, int fortran)
|
||||
cdef np.ndarray PyArray_EnsureArray(object)
|
||||
cdef int PyArray_FillWithScalar(np.ndarray, object)
|
||||
- cdef void import_array()
|
||||
cdef void* PyArray_DATA( np.ndarray )
|
||||
cdef int PyArray_NDIM( np.ndarray )
|
||||
cdef int *PyArray_DIMS( np.ndarray )
|
||||
@@ -226,4 +225,4 @@ cdef class NumpyHandler(FormatHandler):
|
||||
|
||||
# Cython numpy tutorial neglects to mention this AFAICS
|
||||
# get segfaults without it
|
||||
-import_array()
|
||||
+np.import_array()
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b7e8b81c60c1a07d5b29fe89a9f1aba3172cd9e4b68046454e913943e7e4cb6f
|
||||
size 599962
|
3
PyOpenGL-accelerate-3.1.9.tar.gz
Normal file
3
PyOpenGL-accelerate-3.1.9.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0e88282568e2921cf3983a715a9c2ecd9bb5ee45195d0e2648c17ef47ea18bdb
|
||||
size 22027
|
6
_service
6
_service
@@ -16,11 +16,11 @@
|
||||
or my understanding of it.
|
||||
-->
|
||||
<!--
|
||||
<param name="versionrewrite-pattern">227f9c6</param>
|
||||
<param name="versionrewrite-replacement">3.1.6</param>
|
||||
-->
|
||||
<param name="versionrewrite-pattern">29b79e8</param>
|
||||
<param name="versionrewrite-replacement">3.1.7</param>
|
||||
-->
|
||||
<param name="versionrewrite-pattern">5dfca47</param>
|
||||
<param name="versionrewrite-replacement">3.1.9</param>
|
||||
<param name="filename">PyOpenGL-accelerate</param>
|
||||
</service>
|
||||
<service name="recompress" mode="manual">
|
||||
|
22
numpy2.patch
22
numpy2.patch
@@ -1,22 +0,0 @@
|
||||
From f897b0ed75c00d4c524be4689683a334832217ac Mon Sep 17 00:00:00 2001
|
||||
From: "Mike C. Fletcher" <mcfletch@vrplumber.com>
|
||||
Date: Mon, 1 Jul 2024 11:33:37 -0400
|
||||
Subject: [PATCH] BUGFIX Numpy intp type for latest numpy
|
||||
|
||||
---
|
||||
accelerate/src/numpy_formathandler.pyx | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/accelerate/src/numpy_formathandler.pyx b/accelerate/src/numpy_formathandler.pyx
|
||||
index 47ed919b..ae5c7bfa 100644
|
||||
--- a/accelerate/src/numpy_formathandler.pyx
|
||||
+++ b/accelerate/src/numpy_formathandler.pyx
|
||||
@@ -20,7 +20,7 @@ cdef extern from "numpy/arrayobject.h":
|
||||
int NPY_ARRAY_FORCECAST
|
||||
int PyArray_ISCARRAY( np.ndarray instance )
|
||||
int PyArray_ISCARRAY_RO( np.ndarray instance )
|
||||
- cdef np.ndarray PyArray_Zeros(int nd, np.Py_intptr_t* dims, np.dtype, int fortran)
|
||||
+ cdef np.ndarray PyArray_Zeros(int nd, np.npy_intp* dims, np.dtype, int fortran)
|
||||
cdef np.ndarray PyArray_EnsureArray(object)
|
||||
cdef int PyArray_FillWithScalar(np.ndarray, object)
|
||||
cdef void* PyArray_DATA( np.ndarray )
|
@@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 28 15:37:20 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- update to 3.1.9
|
||||
* Reduce the number of iterations in memory leak test to avoid JIT
|
||||
triggering
|
||||
* Cleanup formatting in a few modules
|
||||
* Don't bomb out during egl test when there's no egl devices
|
||||
* Regenerated C wrappers with latest Cython
|
||||
* Numpy intp type for latest numpy
|
||||
* Fix ctypes FormatHandler for Python 3.12+
|
||||
* More changes, see upstream commits
|
||||
- Drop merged 112.patch and numpy2.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 10 12:33:04 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-opengl-accelerate
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
%define tarname PyOpenGL-accelerate
|
||||
%define _version 3.1.7
|
||||
%define _version 3.1.9
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-opengl-accelerate
|
||||
Version: %{_version}
|
||||
@@ -27,10 +27,6 @@ License: BSD-3-Clause
|
||||
Group: Development/Libraries/Python
|
||||
URL: http://pyopengl.sourceforge.net
|
||||
Source0: %{tarname}-%{_version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM - accelerate: Fix C type errors for GCC 14/Clang compatibility
|
||||
Patch0: https://github.com/mcfletch/pyopengl/pull/112.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/mcfletch/pyopengl/commit/f897b0ed75c00d4c524be4689683a334832217ac BUGFIX Numpy intp type for latest numpy
|
||||
Patch1: numpy2.patch
|
||||
BuildRequires: %{python_module Cython}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module opengl >= %{version}}
|
||||
@@ -58,9 +54,6 @@ code.
|
||||
mv accelerate/* ./
|
||||
rmdir accelerate
|
||||
|
||||
# Force Cython to rebuild .c files
|
||||
rm src/*.c
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags} -DGLX_GLXEXT_LEGACY"
|
||||
%python_build
|
||||
@@ -74,7 +67,7 @@ export CFLAGS="%{optflags} -DGLX_GLXEXT_LEGACY"
|
||||
|
||||
%files %{python_files}
|
||||
%license license.txt
|
||||
%doc README.txt
|
||||
%doc README.md
|
||||
%{python_sitearch}/OpenGL_accelerate/
|
||||
%{python_sitearch}/PyOpenGL_accelerate-*-py%{python_version}.egg-info
|
||||
|
||||
|
Reference in New Issue
Block a user