12
0

8 Commits

Author SHA256 Message Date
a5c4271614 Accepting request 1295643 from devel:languages:python
- Add patch support-cython-3.1.patch:
  * Support Cython 3.1 changes.

OBS-URL: https://build.opensuse.org/request/show/1295643
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-opengl-accelerate?expand=0&rev=17
2025-07-25 15:05:33 +00:00
0c764e3b4c - Add patch support-cython-3.1.patch:
* Support Cython 3.1 changes.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-opengl-accelerate?expand=0&rev=33
2025-07-25 05:04:01 +00:00
4398e62a7c Accepting request 1290576 from devel:languages:python
- Switch to pyproject macros.

OBS-URL: https://build.opensuse.org/request/show/1290576
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-opengl-accelerate?expand=0&rev=16
2025-07-06 15:14:03 +00:00
8a9d2571f5 - Switch to pyproject macros.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-opengl-accelerate?expand=0&rev=31
2025-07-04 05:28:39 +00:00
4fac323c35 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
2025-04-30 17:02:57 +00:00
d5a53a39d3 Accepting request 1273192 from home:mcalabkova:branches:devel:languages:python
- 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

OBS-URL: https://build.opensuse.org/request/show/1273192
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-opengl-accelerate?expand=0&rev=29
2025-04-28 19:21:03 +00:00
a2bbfb42e8 Accepting request 1199989 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1199989
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-opengl-accelerate?expand=0&rev=14
2024-09-11 14:56:01 +00:00
57db7355d0 Accepting request 1199876 from home:mcalabkova:branches:devel:languages:python
- Add upstream patch numpy2.patch to fix compatibility with Numpy 2
  * f897b0ed75

OBS-URL: https://build.opensuse.org/request/show/1199876
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-opengl-accelerate?expand=0&rev=27
2024-09-11 07:53:49 +00:00
7 changed files with 70 additions and 72 deletions

View File

@@ -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()

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b7e8b81c60c1a07d5b29fe89a9f1aba3172cd9e4b68046454e913943e7e4cb6f
size 599962

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0e88282568e2921cf3983a715a9c2ecd9bb5ee45195d0e2648c17ef47ea18bdb
size 22027

View File

@@ -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">

View File

@@ -1,3 +1,34 @@
-------------------------------------------------------------------
Fri Jul 25 05:03:22 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-cython-3.1.patch:
* Support Cython 3.1 changes.
-------------------------------------------------------------------
Fri Jul 4 05:28:05 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to pyproject macros.
-------------------------------------------------------------------
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>
- Add upstream patch numpy2.patch to fix compatibility with Numpy 2
* https://github.com/mcfletch/pyopengl/commit/f897b0ed75c00d4c524be4689683a334832217ac
-------------------------------------------------------------------
Wed Jun 5 14:28:18 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>

View File

@@ -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,22 +17,23 @@
%define tarname PyOpenGL-accelerate
%define _version 3.1.7
%define _version 3.1.9
%{?sle15_python_module_pythons}
Name: python-opengl-accelerate
Version: %{_version}
Release: 0
Summary: Acceleration for python-opengl
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 Based on gh#mcfletch/pyopengl#146
Patch0: support-cython-3.1.patch
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module opengl >= %{version}}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module numpy-devel if (%python-base without python36-base)}
@@ -56,15 +57,12 @@ code.
mv accelerate/* ./
rmdir accelerate
# Force Cython to rebuild .c files
rm src/*.c
%build
export CFLAGS="%{optflags} -DGLX_GLXEXT_LEGACY"
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
@@ -72,8 +70,8 @@ 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
%{python_sitearch}/[Pp]y[Oo]pen[Gg][Ll]_accelerate-%{version}.dist-info
%changelog

23
support-cython-3.1.patch Normal file
View File

@@ -0,0 +1,23 @@
From 69e8ced15eb63c3f00293f59cef50d5fad02d884 Mon Sep 17 00:00:00 2001
From: Vsevolod Misiul <vsevolod.misul@innowise.com>
Date: Mon, 19 May 2025 14:46:00 +0300
Subject: [PATCH 1/2] For linux on arm64 the long type is not defined, so grab
it from ctypes.c_long
---
accelerate/src/vbo.pyx | 1 +
1 file changed, 1 insertion(+)
diff --git a/accelerate/src/vbo.pyx b/accelerate/src/vbo.pyx
index 13f9e99d..6e92c059 100644
--- a/accelerate/src/vbo.pyx
+++ b/accelerate/src/vbo.pyx
@@ -1,6 +1,7 @@
"""Cython-coded VBO implementation"""
#cython: language_level=3
import ctypes, weakref
+from ctypes import c_long as long
from OpenGL_accelerate.formathandler cimport FormatHandler
from OpenGL import error
from OpenGL._bytes import bytes,unicode