Skip to content

Commit 932c05a

Browse files
author
Robert Pfeiffer
committed
include more dependencies
1 parent 1538c89 commit 932c05a

File tree

1 file changed

+11
-20
lines changed

1 file changed

+11
-20
lines changed
Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,30 @@
11
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
22
from os.path import join
3-
from shutil import copyfile
43
from pythonforandroid.toolchain import current_directory
5-
import glob
4+
65

76
class Pygame2Recipe(CompiledComponentsPythonRecipe):
87

9-
version = '2.0.0-dev5'
8+
version = '2.0.0-dev7'
109
url = 'https://github.com/pygame/pygame/archive/android.zip'
1110

1211
site_packages_name = 'pygame'
1312
name = 'pygame2'
1413

15-
depends = ['sdl2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'setuptools']
14+
depends = ['sdl2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'setuptools', 'jpeg', 'freetype', 'harfbuzz', 'png']
1615
call_hostpython_via_targetpython = False # Due to setuptools
1716
install_in_hostpython = False
1817

19-
def cythonize_file(self, env, build_dir, filename):
20-
# We can ignore a few files that aren't important to the
21-
# android build, and may not work on Android anyway
22-
do_not_cythonize = []
23-
if basename(filename) in do_not_cythonize:
24-
return
25-
super(Pygame2Recipe, self).cythonize_file(env, build_dir, filename)
26-
2718
def prebuild_arch(self, arch):
2819
super(Pygame2Recipe, self).prebuild_arch(arch)
2920
with current_directory(self.get_build_dir(arch.arch)):
30-
setup_template=open(join("buildconfig", "Setup.Android.SDL2.in")).read()
31-
env=self.get_recipe_env(arch)
32-
setup_file=setup_template.format(
21+
setup_template = open(join("buildconfig", "Setup.Android.SDL2.in")).read()
22+
# env = self.get_recipe_env(arch)
23+
setup_file = setup_template.format(
3324
sdl_includes=(
3425
" -I" + join(self.ctx.bootstrap.build_dir, 'jni', 'SDL', 'include') +
3526
" -L" + join(self.ctx.bootstrap.build_dir, "libs", str(arch))),
36-
sdl_ttf_includes="-I"+join(self.ctx.bootstrap.build_dir, 'jni', 'SDL2_ttf'),
27+
sdl_ttf_includes=" -I"+join(self.ctx.bootstrap.build_dir, 'jni', 'SDL2_ttf'),
3728
sdl_image_includes="-I"+join(self.ctx.bootstrap.build_dir, 'jni', 'SDL2_image'),
3829
sdl_mixer_includes="-I"+join(self.ctx.bootstrap.build_dir, 'jni', 'SDL2_mixer'))
3930
open("Setup", "w").write(setup_file)
@@ -42,9 +33,9 @@ def get_recipe_env(self, arch):
4233
env = super(Pygame2Recipe, self).get_recipe_env(arch)
4334
if 'sdl2' in self.ctx.recipe_build_order:
4435
env['USE_SDL2'] = '1'
45-
46-
env["PYGAME_CROSS_COMPILE"]="TRUE"
47-
env["PYGAME_ANDROID"]="TRUE"
36+
env["PYGAME_CROSS_COMPILE"] = "TRUE"
37+
env["PYGAME_ANDROID"] = "TRUE"
4838
return env
49-
39+
40+
5041
recipe = Pygame2Recipe()

0 commit comments

Comments
 (0)