PyOpenGL-accelerate 3.1.6__tar.gz → 3.1.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/OpenGL_accelerate/__init__.py +3 -2
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/OpenGL_accelerate/formathandler.pxd +1 -0
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/OpenGL_accelerate/wrapper.pxd +2 -0
- pyopengl_accelerate-3.1.9/PKG-INFO +83 -0
- pyopengl_accelerate-3.1.9/PyOpenGL_accelerate.egg-info/PKG-INFO +83 -0
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/PyOpenGL_accelerate.egg-info/SOURCES.txt +6 -11
- pyopengl_accelerate-3.1.9/README.md +15 -0
- pyopengl_accelerate-3.1.9/pyproject.toml +49 -0
- pyopengl_accelerate-3.1.9/setup.cfg +29 -0
- pyopengl_accelerate-3.1.9/setup.py +121 -0
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/src/arraydatatype.pyx +2 -0
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/src/buffers_formathandler.pyx +2 -0
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/src/errorchecker.pyx +1 -0
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/src/formathandler.pyx +1 -0
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/src/latebind.pyx +1 -0
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/src/nones_formathandler.pyx +1 -0
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/src/numpy_formathandler.pyx +6 -5
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/src/vbo.pyx +5 -4
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/src/wrapper.pyx +8 -7
- pyopengl_accelerate-3.1.9/tests/test_arraydatatypeaccel.py +115 -0
- pyopengl_accelerate-3.1.9/tests/test_numpyaccel.py +96 -0
- PyOpenGL-accelerate-3.1.6/PKG-INFO +0 -29
- PyOpenGL-accelerate-3.1.6/PyOpenGL_accelerate.egg-info/PKG-INFO +0 -29
- PyOpenGL-accelerate-3.1.6/README.txt +0 -4
- PyOpenGL-accelerate-3.1.6/setup.cfg +0 -4
- PyOpenGL-accelerate-3.1.6/setup.py +0 -149
- PyOpenGL-accelerate-3.1.6/src/arraydatatype.c +0 -24176
- PyOpenGL-accelerate-3.1.6/src/buffers_formathandler.c +0 -7296
- PyOpenGL-accelerate-3.1.6/src/errorchecker.c +0 -6594
- PyOpenGL-accelerate-3.1.6/src/formathandler.c +0 -6942
- PyOpenGL-accelerate-3.1.6/src/latebind.c +0 -6512
- PyOpenGL-accelerate-3.1.6/src/nones_formathandler.c +0 -5208
- PyOpenGL-accelerate-3.1.6/src/numpy_formathandler.c +0 -10776
- PyOpenGL-accelerate-3.1.6/src/vbo.c +0 -16483
- PyOpenGL-accelerate-3.1.6/src/wrapper.c +0 -29252
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/MANIFEST.in +0 -0
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/PyOpenGL_accelerate.egg-info/dependency_links.txt +0 -0
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/PyOpenGL_accelerate.egg-info/top_level.txt +0 -0
- {PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/license.txt +0 -0
|
@@ -6,5 +6,6 @@ wrapper mechanism. The source code is part of the
|
|
|
6
6
|
PyOpenGL package and is built via the setupaccel.py
|
|
7
7
|
script in the top level of the PyOpenGL source package.
|
|
8
8
|
"""
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
|
|
10
|
+
__version__ = "3.1.9"
|
|
11
|
+
__version_tuple__ = (3, 1, 9)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: PyOpenGL-accelerate
|
|
3
|
+
Version: 3.1.9
|
|
4
|
+
Summary: Cython-coded accelerators for PyOpenGL
|
|
5
|
+
Home-page: http://pyopengl.sourceforge.net
|
|
6
|
+
Download-URL: http://sourceforge.net/project/showfiles.php?group_id=5988
|
|
7
|
+
Author: Mike C. Fletcher
|
|
8
|
+
Author-email: "Mike C. Fletcher" <mcfletch@vrplumber.com>
|
|
9
|
+
License: NOTE:
|
|
10
|
+
|
|
11
|
+
THIS SOFTWARE IS NOT FAULT TOLERANT AND SHOULD NOT BE USED IN ANY
|
|
12
|
+
SITUATION ENDANGERING HUMAN LIFE OR PROPERTY.
|
|
13
|
+
|
|
14
|
+
OpenGL-ctypes PyOpenGL-accelerate License
|
|
15
|
+
|
|
16
|
+
Copyright (c) 2005-2009, Michael C. Fletcher and Contributors
|
|
17
|
+
All rights reserved.
|
|
18
|
+
|
|
19
|
+
Redistribution and use in source and binary forms, with or without
|
|
20
|
+
modification, are permitted provided that the following conditions
|
|
21
|
+
are met:
|
|
22
|
+
|
|
23
|
+
Redistributions of source code must retain the above copyright
|
|
24
|
+
notice, this list of conditions and the following disclaimer.
|
|
25
|
+
|
|
26
|
+
Redistributions in binary form must reproduce the above
|
|
27
|
+
copyright notice, this list of conditions and the following
|
|
28
|
+
disclaimer in the documentation and/or other materials
|
|
29
|
+
provided with the distribution.
|
|
30
|
+
|
|
31
|
+
The name of Michael C. Fletcher, or the name of any Contributor,
|
|
32
|
+
may not be used to endorse or promote products derived from this
|
|
33
|
+
software without specific prior written permission.
|
|
34
|
+
|
|
35
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
36
|
+
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
37
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
38
|
+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
39
|
+
COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
|
40
|
+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
41
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
42
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
43
|
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
44
|
+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
45
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
46
|
+
OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
Project-URL: Homepage, https://mcfletch.github.io/pyopengl/
|
|
51
|
+
Project-URL: Download, https://pypi.org/project/PyOpenGL-accelerate/
|
|
52
|
+
Project-URL: Source, https://github.com/mcfletch/pyopengl
|
|
53
|
+
Project-URL: Documentation, https://mcfletch.github.io/pyopengl/documentation/index.html
|
|
54
|
+
Keywords: Graphics,3D,OpenGL,GLU,GLUT,GLE,GLX,EXT,ARB,Mesa,PyOpenGL
|
|
55
|
+
Platform: Win32
|
|
56
|
+
Platform: Linux
|
|
57
|
+
Platform: OS-X
|
|
58
|
+
Platform: Posix
|
|
59
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
60
|
+
Classifier: Programming Language :: Python
|
|
61
|
+
Classifier: Programming Language :: Python :: 2
|
|
62
|
+
Classifier: Programming Language :: Python :: 3
|
|
63
|
+
Classifier: Topic :: Multimedia :: Graphics :: 3D Rendering
|
|
64
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
65
|
+
Classifier: Intended Audience :: Developers
|
|
66
|
+
Description-Content-Type: text/markdown
|
|
67
|
+
Dynamic: download-url
|
|
68
|
+
|
|
69
|
+
# Acceleration code for PyOpenGL
|
|
70
|
+
|
|
71
|
+
This set of C (Cython) extensions provides acceleration of common operations
|
|
72
|
+
for slow points in PyOpenGL 3.x. It is not a requirement for using PyOpenGL
|
|
73
|
+
but performance without it will be poor.
|
|
74
|
+
|
|
75
|
+
## Build Process
|
|
76
|
+
|
|
77
|
+
Cython is updated frequently to support newer versions of Python. As of
|
|
78
|
+
release 3.1.9 we no longer check in the Cython generated code for the
|
|
79
|
+
wrapper modules, relying on the build machines to generate the wrappers.
|
|
80
|
+
|
|
81
|
+
The Github CI Pipeline should generate and release binary builds for most
|
|
82
|
+
major platforms (Windows, Linux, Mac), but if you need to build from source,
|
|
83
|
+
a `pip install .` **should** work from the PyOpenGL repository.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: PyOpenGL-accelerate
|
|
3
|
+
Version: 3.1.9
|
|
4
|
+
Summary: Cython-coded accelerators for PyOpenGL
|
|
5
|
+
Home-page: http://pyopengl.sourceforge.net
|
|
6
|
+
Download-URL: http://sourceforge.net/project/showfiles.php?group_id=5988
|
|
7
|
+
Author: Mike C. Fletcher
|
|
8
|
+
Author-email: "Mike C. Fletcher" <mcfletch@vrplumber.com>
|
|
9
|
+
License: NOTE:
|
|
10
|
+
|
|
11
|
+
THIS SOFTWARE IS NOT FAULT TOLERANT AND SHOULD NOT BE USED IN ANY
|
|
12
|
+
SITUATION ENDANGERING HUMAN LIFE OR PROPERTY.
|
|
13
|
+
|
|
14
|
+
OpenGL-ctypes PyOpenGL-accelerate License
|
|
15
|
+
|
|
16
|
+
Copyright (c) 2005-2009, Michael C. Fletcher and Contributors
|
|
17
|
+
All rights reserved.
|
|
18
|
+
|
|
19
|
+
Redistribution and use in source and binary forms, with or without
|
|
20
|
+
modification, are permitted provided that the following conditions
|
|
21
|
+
are met:
|
|
22
|
+
|
|
23
|
+
Redistributions of source code must retain the above copyright
|
|
24
|
+
notice, this list of conditions and the following disclaimer.
|
|
25
|
+
|
|
26
|
+
Redistributions in binary form must reproduce the above
|
|
27
|
+
copyright notice, this list of conditions and the following
|
|
28
|
+
disclaimer in the documentation and/or other materials
|
|
29
|
+
provided with the distribution.
|
|
30
|
+
|
|
31
|
+
The name of Michael C. Fletcher, or the name of any Contributor,
|
|
32
|
+
may not be used to endorse or promote products derived from this
|
|
33
|
+
software without specific prior written permission.
|
|
34
|
+
|
|
35
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
36
|
+
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
37
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
38
|
+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
39
|
+
COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
|
40
|
+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
41
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
42
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
43
|
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
44
|
+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
45
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
|
46
|
+
OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
Project-URL: Homepage, https://mcfletch.github.io/pyopengl/
|
|
51
|
+
Project-URL: Download, https://pypi.org/project/PyOpenGL-accelerate/
|
|
52
|
+
Project-URL: Source, https://github.com/mcfletch/pyopengl
|
|
53
|
+
Project-URL: Documentation, https://mcfletch.github.io/pyopengl/documentation/index.html
|
|
54
|
+
Keywords: Graphics,3D,OpenGL,GLU,GLUT,GLE,GLX,EXT,ARB,Mesa,PyOpenGL
|
|
55
|
+
Platform: Win32
|
|
56
|
+
Platform: Linux
|
|
57
|
+
Platform: OS-X
|
|
58
|
+
Platform: Posix
|
|
59
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
60
|
+
Classifier: Programming Language :: Python
|
|
61
|
+
Classifier: Programming Language :: Python :: 2
|
|
62
|
+
Classifier: Programming Language :: Python :: 3
|
|
63
|
+
Classifier: Topic :: Multimedia :: Graphics :: 3D Rendering
|
|
64
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
65
|
+
Classifier: Intended Audience :: Developers
|
|
66
|
+
Description-Content-Type: text/markdown
|
|
67
|
+
Dynamic: download-url
|
|
68
|
+
|
|
69
|
+
# Acceleration code for PyOpenGL
|
|
70
|
+
|
|
71
|
+
This set of C (Cython) extensions provides acceleration of common operations
|
|
72
|
+
for slow points in PyOpenGL 3.x. It is not a requirement for using PyOpenGL
|
|
73
|
+
but performance without it will be poor.
|
|
74
|
+
|
|
75
|
+
## Build Process
|
|
76
|
+
|
|
77
|
+
Cython is updated frequently to support newer versions of Python. As of
|
|
78
|
+
release 3.1.9 we no longer check in the Cython generated code for the
|
|
79
|
+
wrapper modules, relying on the build machines to generate the wrappers.
|
|
80
|
+
|
|
81
|
+
The Github CI Pipeline should generate and release binary builds for most
|
|
82
|
+
major platforms (Windows, Linux, Mac), but if you need to build from source,
|
|
83
|
+
a `pip install .` **should** work from the PyOpenGL repository.
|
{PyOpenGL-accelerate-3.1.6 → pyopengl_accelerate-3.1.9}/PyOpenGL_accelerate.egg-info/SOURCES.txt
RENAMED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
MANIFEST.in
|
|
2
|
-
README.
|
|
2
|
+
README.md
|
|
3
3
|
license.txt
|
|
4
|
+
pyproject.toml
|
|
5
|
+
setup.cfg
|
|
4
6
|
setup.py
|
|
5
7
|
OpenGL_accelerate/__init__.py
|
|
6
8
|
OpenGL_accelerate/formathandler.pxd
|
|
@@ -9,21 +11,14 @@ PyOpenGL_accelerate.egg-info/PKG-INFO
|
|
|
9
11
|
PyOpenGL_accelerate.egg-info/SOURCES.txt
|
|
10
12
|
PyOpenGL_accelerate.egg-info/dependency_links.txt
|
|
11
13
|
PyOpenGL_accelerate.egg-info/top_level.txt
|
|
12
|
-
src/arraydatatype.c
|
|
13
14
|
src/arraydatatype.pyx
|
|
14
|
-
src/buffers_formathandler.c
|
|
15
15
|
src/buffers_formathandler.pyx
|
|
16
|
-
src/errorchecker.c
|
|
17
16
|
src/errorchecker.pyx
|
|
18
|
-
src/formathandler.c
|
|
19
17
|
src/formathandler.pyx
|
|
20
|
-
src/latebind.c
|
|
21
18
|
src/latebind.pyx
|
|
22
|
-
src/nones_formathandler.c
|
|
23
19
|
src/nones_formathandler.pyx
|
|
24
|
-
src/numpy_formathandler.c
|
|
25
20
|
src/numpy_formathandler.pyx
|
|
26
|
-
src/vbo.c
|
|
27
21
|
src/vbo.pyx
|
|
28
|
-
src/wrapper.
|
|
29
|
-
|
|
22
|
+
src/wrapper.pyx
|
|
23
|
+
tests/test_arraydatatypeaccel.py
|
|
24
|
+
tests/test_numpyaccel.py
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Acceleration code for PyOpenGL
|
|
2
|
+
|
|
3
|
+
This set of C (Cython) extensions provides acceleration of common operations
|
|
4
|
+
for slow points in PyOpenGL 3.x. It is not a requirement for using PyOpenGL
|
|
5
|
+
but performance without it will be poor.
|
|
6
|
+
|
|
7
|
+
## Build Process
|
|
8
|
+
|
|
9
|
+
Cython is updated frequently to support newer versions of Python. As of
|
|
10
|
+
release 3.1.9 we no longer check in the Cython generated code for the
|
|
11
|
+
wrapper modules, relying on the build machines to generate the wrappers.
|
|
12
|
+
|
|
13
|
+
The Github CI Pipeline should generate and release binary builds for most
|
|
14
|
+
major platforms (Windows, Linux, Mac), but if you need to build from source,
|
|
15
|
+
a `pip install .` **should** work from the PyOpenGL repository.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name="PyOpenGL-accelerate"
|
|
3
|
+
dynamic=["version"]
|
|
4
|
+
description = "Cython-coded accelerators for PyOpenGL"
|
|
5
|
+
authors = [
|
|
6
|
+
{name="Mike C. Fletcher",email="mcfletch@vrplumber.com"},
|
|
7
|
+
]
|
|
8
|
+
readme = {file="README.md", content-type = "text/markdown"}
|
|
9
|
+
license={file="license.txt"}
|
|
10
|
+
keywords = [
|
|
11
|
+
"Graphics",
|
|
12
|
+
"3D",
|
|
13
|
+
"OpenGL",
|
|
14
|
+
"GLU",
|
|
15
|
+
"GLUT",
|
|
16
|
+
"GLE",
|
|
17
|
+
"GLX",
|
|
18
|
+
"EXT",
|
|
19
|
+
"ARB",
|
|
20
|
+
"Mesa",
|
|
21
|
+
"PyOpenGL",
|
|
22
|
+
]
|
|
23
|
+
classifiers = [
|
|
24
|
+
"License :: OSI Approved :: BSD License",
|
|
25
|
+
"Programming Language :: Python",
|
|
26
|
+
"Programming Language :: Python :: 2",
|
|
27
|
+
"Programming Language :: Python :: 3",
|
|
28
|
+
"Topic :: Multimedia :: Graphics :: 3D Rendering",
|
|
29
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
30
|
+
"Intended Audience :: Developers",
|
|
31
|
+
]
|
|
32
|
+
[project.urls]
|
|
33
|
+
Homepage = "https://mcfletch.github.io/pyopengl/"
|
|
34
|
+
Download = "https://pypi.org/project/PyOpenGL-accelerate/"
|
|
35
|
+
Source = "https://github.com/mcfletch/pyopengl"
|
|
36
|
+
Documentation = "https://mcfletch.github.io/pyopengl/documentation/index.html"
|
|
37
|
+
|
|
38
|
+
[build-system]
|
|
39
|
+
requires = [ "setuptools >= 42.0", "Cython >= 0.28", "numpy" ]
|
|
40
|
+
build-backend = "setuptools.build_meta"
|
|
41
|
+
|
|
42
|
+
[tool.setuptools.dynamic]
|
|
43
|
+
version = {attr = "OpenGL_accelerate.__version__"}
|
|
44
|
+
|
|
45
|
+
[tool.setuptools.packages.find]
|
|
46
|
+
namespaces=false
|
|
47
|
+
include=["OpenGL_accelerate"]
|
|
48
|
+
exclude=["tests","src"]
|
|
49
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[metadata]
|
|
2
|
+
name = PyOpenGL-accelerate
|
|
3
|
+
version = attr: OpenGL_accelerate.__init__.__version__
|
|
4
|
+
description = Acceleration code for PyOpenGL
|
|
5
|
+
author = Mike C. Fletcher
|
|
6
|
+
author_email = mcfletch@vrplumber.com
|
|
7
|
+
url = http://pyopengl.sourceforge.net
|
|
8
|
+
download_url = http://sourceforge.net/project/showfiles.php?group_id=5988
|
|
9
|
+
license = BSD
|
|
10
|
+
long_description = file: README.txt
|
|
11
|
+
long_description_content_type = text/plain
|
|
12
|
+
keywords = PyOpenGL, accelerate, Cython
|
|
13
|
+
platforms = Win32, Linux, OS-X, Posix
|
|
14
|
+
classifiers =
|
|
15
|
+
License :: OSI Approved :: BSD License
|
|
16
|
+
Programming Language :: Python
|
|
17
|
+
Programming Language :: Python :: 3
|
|
18
|
+
Programming Language :: C
|
|
19
|
+
Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Topic :: Multimedia :: Graphics :: 3D Rendering
|
|
21
|
+
Intended Audience :: Developers
|
|
22
|
+
|
|
23
|
+
[options]
|
|
24
|
+
packages = OpenGL_accelerate
|
|
25
|
+
|
|
26
|
+
[egg_info]
|
|
27
|
+
tag_build =
|
|
28
|
+
tag_date = 0
|
|
29
|
+
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
"""Builds accelleration functions for PyOpenGL
|
|
3
|
+
"""
|
|
4
|
+
import sys
|
|
5
|
+
from setuptools import setup, Extension
|
|
6
|
+
|
|
7
|
+
try:
|
|
8
|
+
from Cython.Distutils import build_ext
|
|
9
|
+
except ImportError:
|
|
10
|
+
have_cython = False
|
|
11
|
+
build_ext = False
|
|
12
|
+
else:
|
|
13
|
+
have_cython = True
|
|
14
|
+
|
|
15
|
+
import sys, os
|
|
16
|
+
|
|
17
|
+
HERE = os.path.normpath(os.path.abspath(os.path.dirname(__file__)))
|
|
18
|
+
|
|
19
|
+
extensions = []
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def cython_extension(
|
|
23
|
+
name,
|
|
24
|
+
include_dirs=(),
|
|
25
|
+
):
|
|
26
|
+
"""Create a cython extension object"""
|
|
27
|
+
filenames = "%(name)s.c" % locals(), "%(name)s.pyx" % locals()
|
|
28
|
+
filename = filenames[bool(have_cython)]
|
|
29
|
+
return Extension(
|
|
30
|
+
"OpenGL_accelerate.%(name)s" % locals(),
|
|
31
|
+
[
|
|
32
|
+
os.path.join("src", filename),
|
|
33
|
+
],
|
|
34
|
+
include_dirs=[
|
|
35
|
+
os.path.join(HERE, "src"),
|
|
36
|
+
HERE,
|
|
37
|
+
]
|
|
38
|
+
+ list(include_dirs),
|
|
39
|
+
define_macros=[
|
|
40
|
+
('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION'),
|
|
41
|
+
],
|
|
42
|
+
compiler_directives={'language_level': "3"} if have_cython else {},
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
extensions.extend(
|
|
47
|
+
[
|
|
48
|
+
cython_extension("wrapper"),
|
|
49
|
+
cython_extension("formathandler"),
|
|
50
|
+
cython_extension("arraydatatype"),
|
|
51
|
+
cython_extension("errorchecker"),
|
|
52
|
+
cython_extension("vbo"),
|
|
53
|
+
cython_extension("nones_formathandler"),
|
|
54
|
+
cython_extension("latebind"),
|
|
55
|
+
]
|
|
56
|
+
)
|
|
57
|
+
if sys.version_info[:2] >= (2, 7):
|
|
58
|
+
extensions.extend(
|
|
59
|
+
[
|
|
60
|
+
cython_extension("buffers_formathandler"),
|
|
61
|
+
]
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
try:
|
|
65
|
+
import numpy
|
|
66
|
+
except ImportError:
|
|
67
|
+
sys.stderr.write("""Unable to import numpy, skipping numpy extension building\n""")
|
|
68
|
+
else:
|
|
69
|
+
if hasattr(numpy, "get_include"):
|
|
70
|
+
includeDirectories = [
|
|
71
|
+
numpy.get_include(),
|
|
72
|
+
]
|
|
73
|
+
else:
|
|
74
|
+
includeDirectories = [
|
|
75
|
+
os.path.join(
|
|
76
|
+
os.path.dirname(numpy.__file__),
|
|
77
|
+
"core",
|
|
78
|
+
"include",
|
|
79
|
+
),
|
|
80
|
+
]
|
|
81
|
+
extensions.append(
|
|
82
|
+
cython_extension(
|
|
83
|
+
"numpy_formathandler",
|
|
84
|
+
includeDirectories,
|
|
85
|
+
)
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
if ( # Prevents running of setup during code introspection imports
|
|
89
|
+
__name__ == "__main__"
|
|
90
|
+
):
|
|
91
|
+
# Workaround for Broken apple Python build params echoed in distutils
|
|
92
|
+
# Approach taken from the PyMongo driver. OS-X Python builds were created with
|
|
93
|
+
# non-existent flag, and distutils passes those flags to the extension
|
|
94
|
+
# build, newer clangs now treat those flags as errors rather than warnings.
|
|
95
|
+
import platform, sys
|
|
96
|
+
|
|
97
|
+
if sys.platform == "darwin" and "clang" in platform.python_compiler().lower():
|
|
98
|
+
from distutils.sysconfig import get_config_vars
|
|
99
|
+
|
|
100
|
+
res = get_config_vars()
|
|
101
|
+
for key in ("CFLAGS", "PY_CFLAGS"):
|
|
102
|
+
if key in res:
|
|
103
|
+
res[key] = res[key].replace("-mno-fused-madd", "")
|
|
104
|
+
|
|
105
|
+
extraArguments = {}
|
|
106
|
+
### Now the actual set up call
|
|
107
|
+
if have_cython:
|
|
108
|
+
extraArguments["cmdclass"] = {
|
|
109
|
+
"build_ext": build_ext,
|
|
110
|
+
}
|
|
111
|
+
setup(
|
|
112
|
+
build_requires=['cython'],
|
|
113
|
+
options={
|
|
114
|
+
"sdist": {
|
|
115
|
+
"formats": ["gztar"],
|
|
116
|
+
"force_manifest": True,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
ext_modules=extensions,
|
|
120
|
+
**extraArguments
|
|
121
|
+
)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Accelerator for numpy format handler operations"""
|
|
2
|
+
#cython: language_level=3
|
|
2
3
|
from ctypes import c_void_p
|
|
3
4
|
import numpy as np
|
|
4
5
|
cimport numpy as np
|
|
@@ -19,9 +20,9 @@ cdef extern from "numpy/arrayobject.h":
|
|
|
19
20
|
int NPY_ARRAY_FORCECAST
|
|
20
21
|
int PyArray_ISCARRAY( np.ndarray instance )
|
|
21
22
|
int PyArray_ISCARRAY_RO( np.ndarray instance )
|
|
22
|
-
cdef np.ndarray PyArray_Zeros(int nd, np.
|
|
23
|
+
cdef np.ndarray PyArray_Zeros(int nd, np.npy_intp* dims, np.dtype, int fortran)
|
|
23
24
|
cdef np.ndarray PyArray_EnsureArray(object)
|
|
24
|
-
cdef int PyArray_FillWithScalar(
|
|
25
|
+
cdef int PyArray_FillWithScalar(np.ndarray, object)
|
|
25
26
|
cdef void import_array()
|
|
26
27
|
cdef void* PyArray_DATA( np.ndarray )
|
|
27
28
|
cdef int PyArray_NDIM( np.ndarray )
|
|
@@ -121,7 +122,7 @@ cdef class NumpyHandler(FormatHandler):
|
|
|
121
122
|
c_dims = PyArray_ContiguousFromAny(
|
|
122
123
|
[int(x) for x in dims], np.NPY_INTP, 1,1
|
|
123
124
|
)
|
|
124
|
-
except (ValueError,TypeError)
|
|
125
|
+
except (ValueError,TypeError) as err:
|
|
125
126
|
dims = (int(dims),)
|
|
126
127
|
c_dims = PyArray_ContiguousFromAny(
|
|
127
128
|
dims, np.NPY_INTP, 1,1
|
|
@@ -157,7 +158,7 @@ cdef class NumpyHandler(FormatHandler):
|
|
|
157
158
|
if PyArray_CheckScalar(instance):
|
|
158
159
|
Py_INCREF(instance)
|
|
159
160
|
working = self.c_zeros((1,), typeCode)
|
|
160
|
-
res = PyArray_FillWithScalar(
|
|
161
|
+
res = PyArray_FillWithScalar(working, instance)
|
|
161
162
|
if res < -1:
|
|
162
163
|
raise ValueError("Unable to fill new array with value %r (%s)"%(instance,instance.__class__))
|
|
163
164
|
else:
|
|
@@ -226,4 +227,4 @@ cdef class NumpyHandler(FormatHandler):
|
|
|
226
227
|
|
|
227
228
|
# Cython numpy tutorial neglects to mention this AFAICS
|
|
228
229
|
# get segfaults without it
|
|
229
|
-
import_array()
|
|
230
|
+
# import_array()
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Cython-coded VBO implementation"""
|
|
2
|
+
#cython: language_level=3
|
|
2
3
|
import ctypes, weakref
|
|
3
4
|
from OpenGL_accelerate.formathandler cimport FormatHandler
|
|
4
5
|
from OpenGL import error
|
|
@@ -137,7 +138,7 @@ cdef class VBO:
|
|
|
137
138
|
is concerned).
|
|
138
139
|
"""
|
|
139
140
|
if slice.step and not slice.step == 1:
|
|
140
|
-
raise
|
|
141
|
+
raise NotImplementedError( """Don't know how to map stepped arrays yet""" )
|
|
141
142
|
# TODO: handle e.g. mapping character data into an integer data-set
|
|
142
143
|
data = self.arrayType.asArray( array )
|
|
143
144
|
start = (slice.start or 0)
|
|
@@ -188,7 +189,7 @@ cdef class VBO:
|
|
|
188
189
|
buffers = self.get_implementation().glGenBuffers(1)
|
|
189
190
|
try:
|
|
190
191
|
self.buffer = long( buffers )
|
|
191
|
-
except (TypeError,ValueError)
|
|
192
|
+
except (TypeError,ValueError) as err:
|
|
192
193
|
self.buffer = buffers[0]
|
|
193
194
|
self.target = self.c_resolve( self.target_spec )
|
|
194
195
|
self.usage = self.c_resolve( self.usage_spec )
|
|
@@ -222,11 +223,11 @@ cdef class VBO:
|
|
|
222
223
|
self.created = False
|
|
223
224
|
try:
|
|
224
225
|
self.get_implementation().glDeleteBuffers(1, ctypes.c_uint32( self.buffer))
|
|
225
|
-
except (AttributeError, error.NullFunctionError)
|
|
226
|
+
except (AttributeError, error.NullFunctionError) as err:
|
|
226
227
|
pass
|
|
227
228
|
try:
|
|
228
229
|
self.get_implementation()._DELETERS_.pop( id(self))
|
|
229
|
-
except KeyError
|
|
230
|
+
except KeyError as err:
|
|
230
231
|
pass
|
|
231
232
|
def bind( self ):
|
|
232
233
|
"""Bind this buffer for use in vertex calls"""
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Cython-coded implementation of wrapper module"""
|
|
2
|
+
#cython: language_level=3
|
|
2
3
|
import ctypes
|
|
3
4
|
from OpenGL import error
|
|
4
5
|
from OpenGL._null import NULL as _NULL
|
|
@@ -64,7 +65,7 @@ cdef class CArgCalculatorElement:
|
|
|
64
65
|
return self.c_converter.c_call( pyArgs, self.index, self.wrapper )
|
|
65
66
|
elif self.callable:
|
|
66
67
|
return self.converter.__call__( pyArgs, self.index, self.wrapper )
|
|
67
|
-
except Exception
|
|
68
|
+
except Exception as err:
|
|
68
69
|
err.args += ( self.index, self.wrapper )
|
|
69
70
|
raise
|
|
70
71
|
return self.converter
|
|
@@ -122,7 +123,7 @@ cdef class PyArgCalculatorElement:
|
|
|
122
123
|
return self.converter(
|
|
123
124
|
args[self.index], self.wrapper, args
|
|
124
125
|
)
|
|
125
|
-
except Exception
|
|
126
|
+
except Exception as err:
|
|
126
127
|
if hasattr( err, 'args' ):
|
|
127
128
|
err.args += ( self.converter, )
|
|
128
129
|
raise
|
|
@@ -190,13 +191,13 @@ cdef class CArgumentCalculator:
|
|
|
190
191
|
# heavy operation.
|
|
191
192
|
try:
|
|
192
193
|
result[i] = (<cArgumentConverter>converter).c_call( cArgs[i] )
|
|
193
|
-
except Exception
|
|
194
|
+
except Exception as err:
|
|
194
195
|
err.args += (converter,)
|
|
195
196
|
raise
|
|
196
197
|
else:
|
|
197
198
|
try:
|
|
198
199
|
result[i] = converter( cArgs[i] )
|
|
199
|
-
except Exception
|
|
200
|
+
except Exception as err:
|
|
200
201
|
err.args += (converter,)
|
|
201
202
|
raise
|
|
202
203
|
return result
|
|
@@ -224,7 +225,7 @@ cdef class DefaultCConverter(cArgConverter):
|
|
|
224
225
|
cdef object c_call( self, tuple pyArgs, int index, object baseOperation ):
|
|
225
226
|
try:
|
|
226
227
|
return pyArgs[ self.index ]
|
|
227
|
-
except IndexError
|
|
228
|
+
except IndexError as err:
|
|
228
229
|
raise ValueError(
|
|
229
230
|
"""Expected parameter index %r, but pyArgs only length %s"""%(
|
|
230
231
|
self.index,
|
|
@@ -309,10 +310,10 @@ cdef class Wrapper:
|
|
|
309
310
|
cArguments = cArgs
|
|
310
311
|
try:
|
|
311
312
|
result = self.wrappedOperation( *cArguments )
|
|
312
|
-
except (ctypes.ArgumentError,TypeError,AttributeError)
|
|
313
|
+
except (ctypes.ArgumentError,TypeError,AttributeError) as err:
|
|
313
314
|
err.args = err.args + (cArguments,)
|
|
314
315
|
raise err
|
|
315
|
-
except error.GLError
|
|
316
|
+
except error.GLError as err:
|
|
316
317
|
err.cArgs = cArgs
|
|
317
318
|
err.pyArgs = pyArgs
|
|
318
319
|
raise err
|