Mercurial > touhou
comparison pytouhou/lib/opengl.pyxbld @ 423:d8630c086926
Replace Pyglet with our own Cython OpenGL wrapper.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 16 Jul 2013 21:07:15 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
422:52829ebe2561 | 423:d8630c086926 |
---|---|
1 # -*- encoding: utf-8 -*- | |
2 ## | |
3 ## Copyright (C) 2013 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | |
4 ## | |
5 ## This program is free software; you can redistribute it and/or modify | |
6 ## it under the terms of the GNU General Public License as published | |
7 ## by the Free Software Foundation; version 3 only. | |
8 ## | |
9 ## This program is distributed in the hope that it will be useful, | |
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 ## GNU General Public License for more details. | |
13 ## | |
14 | |
15 """ Build instructions for the OpenGL module. """ | |
16 | |
17 from distutils.extension import Extension | |
18 from subprocess import check_output | |
19 | |
20 COMMAND = 'pkg-config' | |
21 LIBRARIES = ['gl'] | |
22 | |
23 def make_ext(modname, pyxfilename): | |
24 """ Compile and link with the corrects options. """ | |
25 compile_args = check_output([COMMAND, '--cflags'] + LIBRARIES).split() | |
26 link_args = check_output([COMMAND, '--libs'] + LIBRARIES).split() | |
27 return Extension(name=modname, | |
28 sources=[pyxfilename], | |
29 extra_compile_args=compile_args, | |
30 extra_link_args=link_args) |