comparison pytouhou/lib/sdl.pyxbld @ 418:63f59be04a54

Replace Pyglet with SDL2 for window creation and events; disables framerate control/display and sound.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 16 Jul 2013 21:07:15 +0200
parents
children 3a7b36324611
comparison
equal deleted inserted replaced
417:efae61ad6efe 418:63f59be04a54
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 SDL module. """
16
17 from distutils.extension import Extension
18 from subprocess import check_output
19
20 COMMAND = 'pkg-config'
21 LIBRARIES = ['sdl2']
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)