Mercurial > touhou
comparison setup.py @ 590:e15672733c93
Switch to Python 3.x instead of 2.7.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 30 Sep 2014 17:14:24 +0200 |
parents | 8a8c2e519637 |
children | 9dbc234ea087 |
comparison
equal
deleted
inserted
replaced
589:0768122da817 | 590:e15672733c93 |
---|---|
74 } | 74 } |
75 | 75 |
76 | 76 |
77 def get_arguments(arg, libraries): | 77 def get_arguments(arg, libraries): |
78 try: | 78 try: |
79 return check_output([COMMAND, arg] + libraries).split() | 79 return check_output([COMMAND, arg] + libraries).decode().split() |
80 except CalledProcessError: | 80 except CalledProcessError: |
81 # The error has already been displayed, just exit. | 81 # The error has already been displayed, just exit. |
82 sys.exit(1) | 82 sys.exit(1) |
83 except OSError: | 83 except OSError: |
84 # We already said to the user pkg-config was suggested. | 84 # We already said to the user pkg-config was suggested. |
94 opengl_args = {'extra_compile_args': get_arguments('--cflags', GL_LIBRARIES + SDL_LIBRARIES), | 94 opengl_args = {'extra_compile_args': get_arguments('--cflags', GL_LIBRARIES + SDL_LIBRARIES), |
95 'extra_link_args': get_arguments('--libs', GL_LIBRARIES + SDL_LIBRARIES)} | 95 'extra_link_args': get_arguments('--libs', GL_LIBRARIES + SDL_LIBRARIES)} |
96 | 96 |
97 | 97 |
98 for directory, _, files in os.walk('pytouhou'): | 98 for directory, _, files in os.walk('pytouhou'): |
99 if directory.endswith('/__pycache__'): | |
100 continue | |
99 package = directory.replace(os.path.sep, '.') | 101 package = directory.replace(os.path.sep, '.') |
100 if not use_opengl and package in ('pytouhou.ui.opengl', 'pytouhou.ui.opengl.shaders'): | 102 if not use_opengl and package in ('pytouhou.ui.opengl', 'pytouhou.ui.opengl.shaders'): |
101 continue | 103 continue |
102 packages.append(package) | 104 packages.append(package) |
103 if package not in ('pytouhou.formats', 'pytouhou.game', 'pytouhou.lib', | 105 if package not in ('pytouhou.formats', 'pytouhou.game', 'pytouhou.lib', |