diff --git a/PyOpenGL-accelerate-3.1.5.tar.gz b/PyOpenGL-accelerate-3.1.5.tar.gz
deleted file mode 100644
index de7a1ad..0000000
--- a/PyOpenGL-accelerate-3.1.5.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:12e5518b0216a478527c7ce5ddce623c3d0517adeb87226da767772e8b7f2f06
-size 538350
diff --git a/PyOpenGL-accelerate-3.1.6.tar.gz b/PyOpenGL-accelerate-3.1.6.tar.gz
new file mode 100644
index 0000000..d470e60
--- /dev/null
+++ b/PyOpenGL-accelerate-3.1.6.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f022fff9456e7a0ecd3e5ed2c3e598c917c527f6b418fcd99dc4f90c7e7f7645
+size 588161
diff --git a/_service b/_service
new file mode 100644
index 0000000..ed2b7ee
--- /dev/null
+++ b/_service
@@ -0,0 +1,27 @@
+
+
+
+
+ https://github.com/mcfletch/pyopengl
+ git
+ accelerate
+
+ %h
+
+ 227f9c66
+ 3.1.6
+ PyOpenGL-accelerate
+
+
+ *.tar
+ gz
+
+
diff --git a/python-opengl-accelerate.changes b/python-opengl-accelerate.changes
index 472fdf7..cc82478 100644
--- a/python-opengl-accelerate.changes
+++ b/python-opengl-accelerate.changes
@@ -1,3 +1,21 @@
+-------------------------------------------------------------------
+Fri Apr 1 18:52:20 UTC 2022 - Scott Bradnick
+
+- Adding _service file
+- Cleaning up Source0 declaration since PyPI doesn't have a tarball
+- Updating hash for 'accelerate/test' Source[1,2]
+- Adding code to %prep section to deal w/ how _service pulls down
+ files for the gzip'd tarball
+
+-------------------------------------------------------------------
+Thu Mar 31 15:25:18 UTC 2022 - Scott Bradnick
+
+- Update to 3.1.6
+ * Pulled directly from https://github.com/mcfletch/pyopengl since
+ pypi.org (via py2pack fetch) doesn't have this version available.
+ * Seems that some packages which use PyOpenGL and accelerate have
+ a soft requirement that they're the same version.
+
-------------------------------------------------------------------
Tue Mar 23 20:48:03 UTC 2021 - Ben Greiner
diff --git a/python-opengl-accelerate.spec b/python-opengl-accelerate.spec
index 4ee765b..58a845e 100644
--- a/python-opengl-accelerate.spec
+++ b/python-opengl-accelerate.spec
@@ -1,7 +1,7 @@
#
# spec file for package python-opengl-accelerate
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define tarname PyOpenGL-accelerate
-%define _version 3.1.5
+%define _version 3.1.6
Name: python-opengl-accelerate
Version: %{_version}
Release: 0
@@ -26,10 +26,11 @@ Summary: Acceleration for python-opengl
License: BSD-3-Clause
Group: Development/Libraries/Python
URL: http://pyopengl.sourceforge.net
-Source0: https://files.pythonhosted.org/packages/source/P/%{tarname}/%{tarname}-%{_version}.tar.gz
+Source0: %{tarname}-%{_version}.tar.gz
# test files: GitHub repo has no tags, use commit hash
-Source1: https://github.com/mcfletch/pyopengl/raw/6ec398da44/accelerate/tests/test_arraydatatypeaccel.py
-Source2: https://github.com/mcfletch/pyopengl/raw/6ec398da44/accelerate/tests/test_numpyaccel.py
+Source1: https://github.com/mcfletch/pyopengl/raw/c26398b91a/accelerate/tests/test_arraydatatypeaccel.py
+Source2: https://github.com/mcfletch/pyopengl/raw/c26398b91a/accelerate/tests/test_numpyaccel.py
+#
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module opengl >= %{version}}
@@ -51,6 +52,12 @@ code.
%prep
%setup -q -n %{tarname}-%{_version}
+# _service pulldown creates %%{tarname}-%%{_version}/accelerate/,
+# move them to root of build area and remove 'accelerate' directory
+# to continue as normal.
+mv accelerate/* ./
+rmdir accelerate
+
# Force Cython to rebuild .c files
rm src/*.c
diff --git a/test_arraydatatypeaccel.py b/test_arraydatatypeaccel.py
index ed75176..1958640 100644
--- a/test_arraydatatypeaccel.py
+++ b/test_arraydatatypeaccel.py
@@ -3,12 +3,18 @@ from OpenGL.arrays import arraydatatype as adt
from OpenGL.arrays import vbo
from OpenGL import GL
from OpenGL._bytes import integer_types
+import pytest
try:
import numpy
except ImportError:
numpy = None
+try:
+ import OpenGL_accelerate
+except ImportError:
+ pytest.skip('Accelerate not installed, skipping', allow_module_level=True)
class _BaseTest( object ):
+ array = None
def setUp( self ):
self.handler = adt.ArrayDatatype
assert self.handler.isAccelerated
@@ -38,39 +44,41 @@ class _BaseTest( object ):
p = self.handler.arrayToGLType( self.array )
assert p == GL.GL_FLOAT
-if numpy:
- # Skip if modifies the functions, which are *shared* between the
- # classes...
- #@pytest.mark.skipif( not numpy, reason="Numpy not available")
- class TestNumpy( _BaseTest, unittest.TestCase ):
- def setUp( self ):
- self.array = numpy.array( [[1,2,3],[4,5,6]],'f')
- super(TestNumpy,self).setUp()
- def test_dataPointer( self ):
- p = self.handler.dataPointer( self.array )
- assert isinstance( p, integer_types)
- assert p == self.array.ctypes.data
- def test_zeros( self ):
- p = self.handler.zeros( (2,3,4), 'f' )
- assert p.shape == (2,3,4)
- assert p.dtype == numpy.float32
- def test_asArrayConvert( self ):
- p = self.handler.asArray( self.array, GL.GL_DOUBLE )
- assert p is not self.array
- assert p.dtype == numpy.float64
- p = self.handler.asArray( self.array, 'd' )
- assert p is not self.array
- assert p.dtype == numpy.float64
- def test_zeros_typed( self ):
- z = self.handler.zeros( (2,3,4), GL.GL_FLOAT)
- assert z.shape == (2,3,4)
- assert z.dtype == numpy.float32
- def test_downconvert( self ):
- p = self.handler.asArray( numpy.array( [1,2,3],'d'), GL.GL_FLOAT )
- assert p.dtype == numpy.float32
- def test_zeros_small( self ):
- z = self.handler.zeros( 0, GL.GL_BYTE )
- assert z.dtype == numpy.byte, z
+# Skip if modifies the functions, which are *shared* between the
+# classes...
+@pytest.mark.skipif( not numpy, reason="Numpy not available")
+class TestNumpy( _BaseTest, unittest.TestCase ):
+ def setUp( self ):
+ super(TestNumpy,self).setUp()
+ self.array = numpy.array( [[1,2,3],[4,5,6]],'f')
+ handler = adt.ArrayDatatype.getHandler( self.array )
+ handler.registerReturn( )
+
+ def test_dataPointer( self ):
+ p = self.handler.dataPointer( self.array )
+ assert isinstance( p, integer_types)
+ assert p == self.array.ctypes.data
+ def test_zeros( self ):
+ p = self.handler.zeros( (2,3,4), 'f' )
+ assert p.shape == (2,3,4)
+ assert p.dtype == numpy.float32
+ def test_asArrayConvert( self ):
+ p = self.handler.asArray( self.array, GL.GL_DOUBLE )
+ assert p is not self.array
+ assert p.dtype == numpy.float64
+ p = self.handler.asArray( self.array, 'd' )
+ assert p is not self.array
+ assert p.dtype == numpy.float64
+ def test_zeros_typed( self ):
+ z = self.handler.zeros( (2,3,4), GL.GL_FLOAT)
+ assert z.shape == (2,3,4)
+ assert z.dtype == numpy.float32
+ def test_downconvert( self ):
+ p = self.handler.asArray( numpy.array( [1,2,3],'d'), GL.GL_FLOAT )
+ assert p.dtype == numpy.float32
+ def test_zeros_small( self ):
+ z = self.handler.zeros( (0,), GL.GL_BYTE )
+ assert z.dtype == numpy.byte, z
class TestVBO( _BaseTest, unittest.TestCase ):
def setUp( self ):