Skip to content

Commit aec77a1

Browse files
ZachGoldberggoffi-contrib
authored andcommitted
Copy the .so at the right time
1 parent 2434460 commit aec77a1

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

pythonforandroid/recipes/lxml/__init__.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ class LXMLRecipe(CompiledComponentsPythonRecipe):
1717
def should_build(self, arch):
1818
super(LXMLRecipe, self).should_build(arch)
1919
return True
20-
return not exists(join(self.ctx.get_libs_dir(arch.arch), 'liblxml.so'))
20+
return not exists(join(self.ctx.get_libs_dir(arch.arch), 'etree.so'))
21+
22+
def build_arch(self, arch):
23+
super(LXMLRecipe, self).build_arch(arch)
24+
shutil.copyfile('%s/build/lib.linux-x86_64-2.7/lxml/etree.so' % self.get_build_dir(arch.arch), join(self.ctx.get_libs_dir(arch.arch), 'etree.so'))
25+
shutil.copyfile('%s/build/lib.linux-x86_64-2.7/lxml/objectify.so' % self.get_build_dir(arch.arch), join(self.ctx.get_libs_dir(arch.arch), 'objectify.so'))
2126

2227
def get_recipe_env(self, arch):
2328
env = super(LXMLRecipe, self).get_recipe_env(arch)
@@ -26,12 +31,6 @@ def get_recipe_env(self, arch):
2631
targetpython = "%s/include/python2.7/" % dirname(dirname(self.ctx.hostpython))
2732
env['CC'] += " -I%s/include -I%s -I%s" % (bxml, bxsl, targetpython)
2833
env['LDSHARED'] = '%s -lpython2.7 -nostartfiles' % env['CC']
29-
#env['LDSHARED'] = join(self.ctx.root_dir, 'tools', 'liblink')
30-
# WTH is liblink?
31-
#env['LDSHARED'] = env['LIBLINK']
32-
# This linking almost works. Going to have to muck with LDSHARED to
33-
# include the libs_collection folder
34-
#zgoldberg@badass:~/.local/share/python-for-android/build/other_builds/lxml/armeabi/lxml (master)$ /usr/bin/ccache arm-linux-androideabi-ld -L/home/zgoldberg/.local/share/python-for-android/build/other_builds/libxml2/armeabi/libxml2//include -L/home/zgoldberg/.local/share/python-for-android/build/other_builds/libxslt/armeabi/libxslt -L/home/zgoldberg/android-sdks/ndk-bundle/platforms/android-16/arch-arm/usr/lib/ -L/home/zgoldberg/android-sdks/ndk-bundle/platforms/android-16/arch-arm/usr/lib/ -L/home/zgoldberg/.local/share/python-for-android/build/libs_collections/peggo-python/armeabi build/temp.linux-x86_64-2.7/src/lxml/lxml.objectify.o -lxslt -lxml2 -lpython2.7 -lz -lm -o build/lib.linux-x86_64-2.7/lxml/objectify.soi
3534

3635
return env
3736

0 commit comments

Comments
 (0)