Skip to content

Commit 9e028ec

Browse files
committed
remove some warnings, comment ccache print, and show path only when there is an issue
1 parent 8113a1d commit 9e028ec

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

pythonforandroid/archs.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,16 @@ def get_env(self, with_flags_in_cc=True):
5757

5858
ccache = ''
5959
if self.ctx.ccache and bool(int(environ.get('USE_CCACHE', '1'))):
60-
print('ccache found, will optimize builds')
60+
# print('ccache found, will optimize builds')
6161
ccache = self.ctx.ccache + ' '
6262
env['USE_CCACHE'] = '1'
6363
env['NDK_CCACHE'] = self.ctx.ccache
6464
env.update({k: v for k, v in environ.items() if k.startswith('CCACHE_')})
6565

66-
print('path is', environ['PATH'])
6766
cc = find_executable('{command_prefix}-gcc'.format(
6867
command_prefix=command_prefix), path=environ['PATH'])
6968
if cc is None:
69+
print('Searching path are: {!r}'.format(environ['PATH']))
7070
warning('Couldn\'t find executable for CC. This indicates a '
7171
'problem locating the {} executable in the Android '
7272
'NDK, not that you don\'t have a normal compiler '
@@ -180,4 +180,3 @@ def get_env(self, with_flags_in_cc=True):
180180
env['CC'] += incpath
181181
env['CXX'] += incpath
182182
return env
183-

pythonforandroid/recipe.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,6 @@ def download(self):
376376
info('{} download already cached, skipping'
377377
.format(self.name))
378378

379-
# Should check headers here!
380-
warning('Should check headers here! Skipping for now.')
381-
382379
# If we got this far, we will download
383380
if do_download:
384381
debug('Downloading {} from {}'.format(self.name, url))
@@ -924,7 +921,7 @@ def rebuild_compiled_components(self, arch, env):
924921
class CppCompiledComponentsPythonRecipe(CompiledComponentsPythonRecipe):
925922
""" Extensions that require the cxx-stl """
926923
call_hostpython_via_targetpython = False
927-
924+
928925
def get_recipe_env(self, arch):
929926
env = super(CppCompiledComponentsPythonRecipe, self).get_recipe_env(arch)
930927
keys = dict(
@@ -942,21 +939,21 @@ def get_recipe_env(self, arch):
942939
env['LDFLAGS'] += " -L{ctx.ndk_dir}/sources/cxx-stl/gnu-libstdc++/{ctx.toolchain_version}/libs/{arch.arch}" \
943940
" -lpython2.7" \
944941
" -lgnustl_shared".format(**keys)
945-
946-
942+
943+
947944
return env
948-
945+
949946
def build_compiled_components(self,arch):
950947
super(CppCompiledComponentsPythonRecipe, self).build_compiled_components(arch)
951-
948+
952949
# Copy libgnustl_shared.so
953950
with current_directory(self.get_build_dir(arch.arch)):
954951
sh.cp(
955952
"{ctx.ndk_dir}/sources/cxx-stl/gnu-libstdc++/{ctx.toolchain_version}/libs/{arch.arch}/libgnustl_shared.so".format(ctx=self.ctx,arch=arch),
956953
self.ctx.get_libs_dir(arch.arch)
957954
)
958-
959-
955+
956+
960957

961958

962959
class CythonRecipe(PythonRecipe):

0 commit comments

Comments
 (0)