glew_header = 'win_glew/gl/glew.h' includes = ['win_glew'] libs = ['glew32', 'openGL32'] lib_dir = ['win_glew'] link_args = [] elif platform.system() == 'Linux': glew_header = '/usr/include/GL/glew.h' includes = ['/usr/include/GL'] libs = ['GLEW'] link_args = [] if os.path.isfile('glew.pxd') and os.stat('glew.pxd')[ST_MTIME] > os.stat(glew_header)[ST_MTIME]: print("'glew.pxd' is up-to-date.") else: print("generating glew.pxd based on '%s'"%glew_header) generate_pxd(glew_header) extensions = [ #first submodule: utils Extension( name="cygl.utils", sources=['utils.pyx'], include_dirs = includes, libraries = libs, library_dirs = lib_dir, extra_link_args=link_args, extra_compile_args=['-std=c++11'], language="c++"), Extension( name="cygl.shader", sources=['shader.pyx'], include_dirs = includes,
extra_compile_args = ["-O2"] fontstash_compile_args = [ "/DFONTSTASH_IMPLEMENTATION", "/DGLFONTSTASH_IMPLEMENTATION", ] glew_binaries = [("", ["pyglui/cygl/win_glew/glew32.dll"])] else: raise Exception("Platform build not implemented.") if (os.path.isfile("pyglui/cygl/glew.pxd") and os.stat("pyglui/cygl/glew.pxd")[ST_MTIME] > os.stat(glew_header)[ST_MTIME]): print("'glew.pxd' is up-to-date.") else: print("generating glew.pxd based on '%s'" % glew_header) generate_pxd(glew_header, "pyglui/cygl") extensions = [ Extension( name="pyglui.ui", sources=["pyglui/ui.pyx"], include_dirs=includes + ["pyglui/pyfontstash/fontstash/src"], libraries=libs, library_dirs=lib_dir, extra_link_args=link_args, extra_compile_args=extra_compile_args, language="c++", ), Extension( name="pyglui.graph", sources=["pyglui/graph.pyx"],
includes = ['win_glew'] libs = ['glew32', 'openGL32'] lib_dir = ['win_glew'] link_args = [] elif platform.system() == 'Linux': glew_header = '/usr/include/GL/glew.h' includes = ['/usr/include/GL'] libs = ['GLEW'] link_args = [] if os.path.isfile('glew.pxd') and os.stat('glew.pxd')[ST_MTIME] > os.stat( glew_header)[ST_MTIME]: print("'glew.pxd' is up-to-date.") else: print("generating glew.pxd based on '%s'" % glew_header) generate_pxd(glew_header) extensions = [ #first submodule: utils Extension(name="cygl.utils", sources=['utils.pyx'], include_dirs=includes, libraries=libs, library_dirs=lib_dir, extra_link_args=link_args, extra_compile_args=['-std=c++11'], language="c++"), Extension(name="cygl.shader", sources=['shader.pyx'], include_dirs=includes, libraries=libs,