Skip to content

Commit

Permalink
Merge pull request #7029 from jitseniesen/load-gl
Browse files Browse the repository at this point in the history
PR: Load libGL using low-level function without requiring pyopengl
  • Loading branch information
ccordoba12 authored May 6, 2018
2 parents 8107f33 + f2c9d56 commit 6d70154
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 1 addition & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,7 @@ def run(self):
'numpydoc',
# Packages for pyqt5 are only available in
# Python 3
'pyqt5<5.10;python_version>="3"',
# This is only needed for our wheels on Linux.
# See issue #3332
'pyopengl;platform_system=="Linux"'
'pyqt5<5.10;python_version>="3"'
]

extras_require = {
Expand Down
7 changes: 4 additions & 3 deletions spyder/app/start.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-

# Std imports
import ctypes
import os
import os.path as osp
import random
Expand All @@ -12,10 +13,10 @@
# See issue 5324
import zmq

# This import is needed to fix errors with OpenGL when installed using pip
# See issue 3332
# Load GL library to prevent segmentation faults on some Linux systems
# See issues 3226 and 3332
try:
from OpenGL import GL
ctypes.CDLL("libGL.so.1", mode=ctypes.RTLD_GLOBAL)
except:
pass

Expand Down

0 comments on commit 6d70154

Please sign in to comment.