I've pushed code to attempt to address this in the develop branch on github: https://github.com/mcfletch/pyopengl which should detect wayland. Note that it also uses EGL under xwayland, though I'm not sure that is the correct path. Note also that XDG_SESSION_TYPE will often be missing if wayland wasn't started from a desktop manager, so we'll also check for WAYLAND_DISPLAY. Please test if this addresses your issue.
Use the network mask when checking isAdressValidForIf
OpenGL for python displayed TypeError in Linux
Have you installed freeglut/glut on the machine? You have a NULL _base_glutInit,...
Note that your error is quite different. You are seeing a build failure because cython...
Note: Ubuntu 12.04 packages for sphinx base do not include the sphinx_lm_convert...