@@ -45,32 +45,22 @@ def build_arch(self, arch):
45
45
if not exists (path ):
46
46
info ("creating {}" .format (path ))
47
47
shprint (sh .mkdir , '-p' , path )
48
- cli = env ['CC' ].split ()
49
- cc = sh .Command (cli [0 ])
48
+ cli = env ['CC' ].split ()[0 ]
49
+ # makes sure first CC command is the compiler rather than ccache, refs:
50
+ # https://github.com/kivy/python-for-android/issues/1399
51
+ if 'ccache' in cli :
52
+ cli = env ['CC' ].split ()[1 ]
53
+ cc = sh .Command (cli )
50
54
51
55
with current_directory (self .get_build_dir (arch .arch )):
52
56
cflags = env ['CFLAGS' ].split ()
53
- cflags .extend (['-I.' , '-c' , '-l.' , 'glob.c' , '-I.' ]) # , '-o', 'glob.o'])
57
+ cflags .extend (['-I.' , '-c' , '-l.' , 'glob.c' , '-I.' ])
54
58
shprint (cc , * cflags , _env = env )
55
-
56
59
cflags = env ['CFLAGS' ].split ()
57
- srindex = cflags .index ('--sysroot' )
58
- if srindex :
59
- cflags [srindex + 1 ] = self .ctx .ndk_platform
60
60
cflags .extend (['-shared' , '-I.' , 'glob.o' , '-o' , 'libglob.so' ])
61
+ cflags .extend (env ['LDFLAGS' ].split ())
61
62
shprint (cc , * cflags , _env = env )
62
-
63
63
shprint (sh .cp , 'libglob.so' , join (self .ctx .libs_dir , arch .arch ))
64
- shprint (sh .cp , "libglob.so" , join (self .ctx .get_python_install_dir (), 'lib' ))
65
- # drop header in to the Python include directory
66
- shprint (sh .cp , "glob.h" , join (self .ctx .get_python_install_dir (),
67
- 'include/python{}' .format (
68
- self .ctx .python_recipe .version [0 :3 ]
69
- )
70
- )
71
- )
72
- include_path = join (self .ctx .python_recipe .get_build_dir (arch .arch ), 'Include' )
73
- shprint (sh .cp , "glob.h" , include_path )
74
64
75
65
76
66
recipe = LibGlobRecipe ()
0 commit comments