-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pyopengl[-accelerate]: update to 3.1.8
- Loading branch information
Showing
6 changed files
with
139 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
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() |
10 changes: 10 additions & 0 deletions
10
mingw-w64-python-pyopengl-accelerate/pyopengl-version.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- a/accelerate/OpenGL_accelerate/__init__.py 2024-11-10 00:15:51.762734061 +0700 | ||
+++ b/accelerate/OpenGL_accelerate/__init__.py 2024-11-10 00:15:58.159686979 +0700 | ||
@@ -6,5 +6,5 @@ | ||
PyOpenGL package and is built via the setupaccel.py | ||
script in the top level of the PyOpenGL source package. | ||
""" | ||
-__version__ = "3.1.7" | ||
-__version_tuple__ = (3, 1, 7) | ||
+__version__ = "3.1.8" | ||
+__version_tuple__ = (3, 1, 8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From e727dc530f4abfe0091be068573d7dda311fc575 Mon Sep 17 00:00:00 2001 | ||
From: Antoine Martin <totaam@xpra.org> | ||
Date: Fri, 27 Oct 2023 15:25:07 +0700 | ||
Subject: [PATCH] fix resource warning | ||
|
||
``` | ||
/usr/lib/python3.11/site-packages/OpenGL/platform/egl.py:76: ResourceWarning: unclosed file <_io.TextIOWrapper | ||
name='/proc/cpuinfo' mode='r' encoding='UTF-8'> | ||
info = open('/proc/cpuinfo').read() | ||
``` | ||
--- | ||
OpenGL/platform/egl.py | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/OpenGL/platform/egl.py b/OpenGL/platform/egl.py | ||
index 55fbb0be..44b55024 100644 | ||
--- a/OpenGL/platform/egl.py | ||
+++ b/OpenGL/platform/egl.py | ||
@@ -73,7 +73,8 @@ def EGL(self): | ||
# https://github.com/raspberrypi/firmware/issues/110 | ||
import os | ||
if os.path.exists('/proc/cpuinfo'): | ||
- info = open('/proc/cpuinfo').read() | ||
+ with open('/proc/cpuinfo', 'r') as f: | ||
+ info = f.read() | ||
if 'BCM2708' in info or 'BCM2709' in info: | ||
assert self.GLES2 | ||
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- a/OpenGL/version.py 2024-11-10 00:15:51.762734061 +0700 | ||
+++ b/OpenGL/version.py 2024-11-10 00:15:58.159686979 +0700 | ||
@@ -1,2 +1,2 @@ | ||
"""Declares the current version for use in setuptools and the like""" | ||
-__version__ = "3.1.7" | ||
+__version__ = "3.1.8" |