pyopengl icon indicating copy to clipboard operation
pyopengl copied to clipboard

Fails to build with Cython 3.1.0

Open lazka opened this issue 11 months ago • 2 comments

[1/1] Cythonizing src/vbo.pyx

Error compiling Cython file:
------------------------------------------------------------
...
    def create_buffers( self ):
        """Create the internal buffer(s)"""
        assert not self.created, """Already created the buffer"""
        buffers = self.get_implementation().glGenBuffers(1)
        try:
            self.buffer = long( buffers )
                          ^
------------------------------------------------------------

src/vbo.pyx:191:26: undeclared name not builtin: long

lazka avatar May 20 '25 07:05 lazka

I haven't looked at the code yet, but this is usually solved by using int since the long python type was removed from python 3. If the buffer really must be a C long, then use this instead: from ctypes import c_long as long.

totaam avatar May 20 '25 09:05 totaam

Hello, I've submitted a pull request with a fix.

I hope it will be reviewed and merged soon.

vsevolod-misiul avatar May 21 '25 10:05 vsevolod-misiul