Changeset 4724 for trunk


Ignore:
Timestamp:
Jan 6, 2021 10:43:56 AM (2 years ago)
Author:
toby
Message:

add Big Sur patch for OpenGL.GL bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4717 r4724  
    3939try:
    4040    import OpenGL as ogl
     41    try:
     42        import OpenGL.GL   # this fails in <=2020 versions of Python on OS X 11.x
     43    except ImportError:
     44        print('Drat, patching for Big Sur')
     45        from ctypes import util
     46        orig_util_find_library = util.find_library
     47        def new_util_find_library( name ):
     48            res = orig_util_find_library( name )
     49            if res: return res
     50            return '/System/Library/Frameworks/'+name+'.framework/'+name
     51        util.find_library = new_util_find_library
    4152except ImportError:
    4253    pass
Note: See TracChangeset for help on using the changeset viewer.