diff --git a/accelerate/pyproject.toml b/accelerate/pyproject.toml index ddc74ffa..1c3d6867 100644 --- a/accelerate/pyproject.toml +++ b/accelerate/pyproject.toml @@ -1,6 +1,7 @@ [project] name="PyOpenGL-accelerate" dynamic=["version"] +requires-python = ">= 3.9" # At least Python 3.9 description = "Cython-coded accelerators for PyOpenGL" authors = [ {name="Mike C. Fletcher",email="mcfletch@vrplumber.com"}, @@ -23,7 +24,6 @@ keywords = [ classifiers = [ "License :: OSI Approved :: BSD License", "Programming Language :: Python", - "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Multimedia :: Graphics :: 3D Rendering", "Topic :: Software Development :: Libraries :: Python Modules", @@ -36,7 +36,7 @@ Source = "https://github.com/mcfletch/pyopengl" Documentation = "https://mcfletch.github.io/pyopengl/documentation/index.html" [build-system] -requires = [ "setuptools >= 42.0", "Cython >= 0.28", "numpy" ] +requires = [ "setuptools >= 42.0", "Cython >= 3", "numpy" ] build-backend = "setuptools.build_meta" [tool.setuptools.dynamic] @@ -45,5 +45,5 @@ version = {attr = "OpenGL_accelerate.__version__"} [tool.setuptools.packages.find] namespaces=false include=["OpenGL_accelerate"] -exclude=["tests","src"] +exclude=["tests", "src"] diff --git a/accelerate/src/vbo.pyx b/accelerate/src/vbo.pyx index 13f9e99d..e4b0ce29 100644 --- a/accelerate/src/vbo.pyx +++ b/accelerate/src/vbo.pyx @@ -188,8 +188,8 @@ cdef class VBO: assert not self.created, """Already created the buffer""" buffers = self.get_implementation().glGenBuffers(1) try: - self.buffer = long( buffers ) - except (TypeError,ValueError) as err: + self.buffer = int( buffers ) + except (TypeError, ValueError) as err: self.buffer = buffers[0] self.target = self.c_resolve( self.target_spec ) self.usage = self.c_resolve( self.usage_spec ) @@ -242,7 +242,7 @@ cdef class VBO: """Add an integer to this VBO (offset)""" if hasattr( other, 'offset' ): other = other.offset - assert isinstance( other, (int,long) ), """Only know how to add integer/long offsets""" + assert isinstance( other, int), """Only know how to add integer offsets""" return VBOOffset( self, other ) cdef int check_live( self ): if self.data is _NULL: