File tree Expand file tree Collapse file tree 6 files changed +97
-15
lines changed Expand file tree Collapse file tree 6 files changed +97
-15
lines changed Original file line number Diff line number Diff line change
1
+
2
+ from pythonforandroid .toolchain import (PythonRecipe , shprint ,
3
+ current_directory , info , Recipe )
4
+ from pythonforandroid .patching import will_build , check_any
5
+ import sh
6
+ from os .path import join
7
+
8
+ class BSoup4Recipe (PythonRecipe ):
9
+ version = '4.1.0'
10
+ url = 'https://www.crummy.com/software/BeautifulSoup/bs4/download/4.0/beautifulsoup4-{version}.tar.gz'
11
+ depends = [('python2' , 'python3crystax' ), 'lxml' ]
12
+ site_packages_name = 'beautifulsoup4'
13
+ call_hostpython_via_targetpython = True
14
+ def get_recipe_env (self , arch ):
15
+ env = super (BSoup4Recipe , self ).get_recipe_env (arch )
16
+
17
+
18
+ lxml_recipe = Recipe .get_recipe ('lxml' , self .ctx )
19
+
20
+ env ['CC' ] = env ['CC' ] + ' -I{lxml_dir}/include -I{lxml_dir}' .format (
21
+ lxml_dir = lxml_recipe .get_build_dir (arch ))
22
+
23
+ env ['LDFLAGS' ] = ('-Llxml_dir/lxml/.libs -Llxml_dir/lxml/.libs ' ).format (lxml_dir = lxml_recipe .get_build_dir (arch ))
24
+
25
+ recipe = BSoup4Recipe ()
Original file line number Diff line number Diff line change 5
5
from os .path import join
6
6
7
7
8
- class Libxml2Recipe (CythonRecipe ):
9
- version = '2.9.4 '
8
+ class Libxml2Recipe (Recipe ):
9
+ version = '2.9.3 '
10
10
url = 'ftp://xmlsoft.org/libxml2/libxml2-{version}.tar.gz'
11
11
name = 'libxml2'
12
12
depends = [('python2' , 'python3crystax' )]
13
13
14
14
def get_recipe_env (self , arch ):
15
15
env = super (Libxml2Recipe , self ).get_recipe_env (arch )
16
16
17
- try :
18
- sh .sed ('runtest\$(EXEEXT) \\ / \\ /' , 'Makefile' )
19
- except :
20
- pass
21
- try :
22
- sh .sed ('testrecurse\$(EXEEXT)$//' , 'Makefile' )
23
- except :
24
- pass
25
- try :
26
- sh .make ('-j' , '$MAKE_JOBS' )
27
- except :
28
- pass
17
+ sh .sed ('runtest$(EXEEXT) \/ \/' , 'Makefile' )
18
+ sh .sed ('testrecurse$(EXEEXT)$//' , 'Makefile' )
19
+ sh .make ('-j' , '5' )
29
20
30
21
31
22
recipe = Libxml2Recipe ()
Original file line number Diff line number Diff line change
1
+ from pythonforandroid .toolchain import (CythonRecipe , shprint ,
2
+ current_directory , info , Recipe )
3
+ from pythonforandroid .patching import will_build , check_any
4
+ import sh
5
+ from os .path import exists ,join
6
+
7
+ class LibxsltRecipe (CythonRecipe ):
8
+ version = '1.1.29'
9
+ url = 'ftp://xmlsoft.org/libxslt/libxslt-{version}.tar.gz'
10
+ name = 'libxslt'
11
+ depends = [('python2' , 'python3crystax' ), 'libxml2' ]
12
+ patches = ['fix-dlopen.patch' ]
13
+
14
+ def should_build (self , arch ):
15
+ return not exists (join (self .get_build_container_dir (arch .arch ),"libxslt/.libs/libxslt.a" ))
16
+
17
+
18
+ def get_recipe_env (self , arch ):
19
+ env = super (LibxsltRecipe , self ).get_recipe_env (arch )
20
+ sh .make ('-j' , '5' )
21
+
22
+
23
+ recipe = LibxsltRecipe ()
Original file line number Diff line number Diff line change
1
+ --- libxslt-1.1.27.orig/python/libxsl.py 2012-09-04 16:26:23.000000000 +0200
2
+ +++ libxslt-1.1.27/python/libxsl.py 2013-07-29 15:11:04.182227378 +0200
3
+ @@ -4,7 +4,7 @@
4
+ # loader to work in that mode if feasible
5
+ #
6
+ import sys
7
+ - if not hasattr(sys,'getdlopenflags'):
8
+ + if True:
9
+ import libxml2mod
10
+ import libxsltmod
11
+ import libxml2
Original file line number Diff line number Diff line change
1
+
2
+
3
+ from pythonforandroid .toolchain import (CythonRecipe , shprint ,
4
+ current_directory , info , Recipe )
5
+ from pythonforandroid .patching import will_build , check_any
6
+ import sh
7
+ from os .path import join
8
+
9
+
10
+ class LxmlRecipe (CythonRecipe ):
11
+ version = '3.7.2'
12
+ url = 'https://github.com/lxml/lxml/archive/lxml-{version}.tar.gz'
13
+ name = 'lxml'
14
+ depends = [('python2' , 'python3crystax' ), 'libxslt' ]
15
+
16
+ def get_recipe_env (self , arch ):
17
+ env = super (LxmlRecipe , self ).get_recipe_env (arch )
18
+
19
+ libxslt_recipe = Recipe .get_recipe ('libxslt' , self .ctx )
20
+ libxml2_recipe = Recipe .get_recipe ('libxml2' , self .ctx )
21
+
22
+ env ['CC' ] = env ['CC' ] + ' -I{libxslt_dir}/include -I{libxslt_dir}' .format (
23
+ librslt_dir = libxslt_recipe .get_build_dir (arch ))
24
+
25
+ env ['LDFLAGS' ] = ('-Llibxslt_dir/libxslt/.libs -Llibxslt_dir/libexslt/.libs '
26
+ '-Llibxml2_dir/.libs -Llibxslt_dir/libxslt -Llibxslt_dir/libexslt '
27
+ '-Llibxml2_dir/ ' ).format (libxslt_dir = libxslt_recipe .get_build_dir (arch ),
28
+ libxml2_dir = libxml2_recipe .get_build_dir (arch ))
29
+
30
+ # env['LDSHARED'] = env['LIBLINK'] # not sure this is necessary in new toolchain
31
+
32
+ recipe = LxmlRecipe ()
Original file line number Diff line number Diff line change 1
1
from pythonforandroid .toolchain import PythonRecipe
2
2
3
3
class RequestsRecipe (PythonRecipe ):
4
- version = '2.9.1 '
4
+ version = '2.12.3 '
5
5
url = 'https://github.com/kennethreitz/requests/archive/v{version}.tar.gz'
6
6
depends = ['hostpython2' , 'setuptools' ]
7
7
site_packages_name = 'requests'
You can’t perform that action at this time.
0 commit comments