Skip to content

Commit ca1d25a

Browse files
committed
[lxml] recipe fix
This patch fixes the recipes from PR #1166.
1 parent 306d444 commit ca1d25a

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

pythonforandroid/recipes/libxml2/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def build_arch(self, arch):
1818
with current_directory(self.get_build_dir(arch.arch)):
1919
env['CC'] += " -I%s" % self.get_build_dir(arch.arch)
2020
shprint(sh.Command('./configure'), '--host=arm-linux-eabi',
21-
'--without-modules', '--without-legacy', '--without-hfinistory', '--without-debug', '--without-docbook', '--without-python', '--without-threads', '--without-iconv',
21+
'--without-modules', '--without-legacy', '--without-history', '--without-debug', '--without-docbook', '--without-python', '--without-threads', '--without-iconv',
2222
_env=env)
2323

2424
# Ensure we only build libxml2.la as if we do everything
@@ -31,7 +31,7 @@ def get_recipe_env(self, arch):
3131
env = super(Libxml2Recipe, self).get_recipe_env(arch)
3232
env['CONFIG_SHELL'] = '/bin/bash'
3333
env['SHELL'] = '/bin/bash'
34-
env['CC'] = '/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer'
34+
env['CC'] = 'arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot={}'.format(self.ctx.ndk_platform)
3535
return env
3636

3737
recipe = Libxml2Recipe()

pythonforandroid/recipes/libxslt/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from pythonforandroid.toolchain import Recipe, shprint, shutil, current_directory
2-
from os.path import exists, join, dirname, basename
2+
from os.path import exists, join, dirname
33
import sh
44

55
class LibxsltRecipe(Recipe):
@@ -36,7 +36,8 @@ def get_recipe_env(self, arch):
3636
env = super(LibxsltRecipe, self).get_recipe_env(arch)
3737
env['CONFIG_SHELL'] = '/bin/bash'
3838
env['SHELL'] = '/bin/bash'
39-
env['CC'] = '/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer'
39+
env['CC'] = 'arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot={}'.format(self.ctx.ndk_platform)
40+
4041
env['LDSHARED'] = "%s -nostartfiles -shared -fPIC" % env['CC']
4142
return env
4243

pythonforandroid/recipes/lxml/__init__.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
from pythonforandroid.toolchain import Recipe, shprint, shutil, current_directory
2-
from pythonforandroid.toolchain import CompiledComponentsPythonRecipe
3-
from pythonforandroid.util import current_directory, ensure_dir
4-
from pythonforandroid.logger import debug, shprint, info
1+
from pythonforandroid.toolchain import Recipe, shutil
2+
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
53
from os.path import exists, join, dirname
6-
import sh
7-
import glob
84

95
class LXMLRecipe(CompiledComponentsPythonRecipe):
106
version = '3.6.0'
@@ -26,8 +22,8 @@ def build_arch(self, arch):
2622

2723
def get_recipe_env(self, arch):
2824
env = super(LXMLRecipe, self).get_recipe_env(arch)
29-
libxslt_recipe = Recipe.get_recipe('libxslt', self.ctx)
30-
libxml2_recipe = Recipe.get_recipe('libxml2', self.ctx)
25+
libxslt_recipe = Recipe.get_recipe('libxslt', self.ctx).get_build_dir(arch.arch)
26+
libxml2_recipe = Recipe.get_recipe('libxml2', self.ctx).get_build_dir(arch.arch)
3127
targetpython = "%s/include/python2.7/" % dirname(dirname(self.ctx.hostpython))
3228
env['CC'] += " -I%s/include -I%s -I%s" % (libxml2_recipe, libxslt_recipe, targetpython)
3329
env['LDSHARED'] = '%s -nostartfiles -shared -fPIC -lpython2.7' % env['CC']

0 commit comments

Comments
 (0)