8000 Merge pull request #1160 from inclement/cleanup · andrewmk/python-for-android@e61c889 · GitHub
[go: up one dir, main page]

Skip to content

Commit e61c889

Browse files
authored
Merge pull request kivy#1160 from inclement/cleanup
Cleaned up some old comments
2 parents 727b6b2 + ae93673 commit e61c889

File tree

16 files changed

+20
-79
lines changed

16 files changed

+20
-79
lines changed

pythonforandroid/archs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def get_env(self, with_flags_in_cc=True):
121121

122122
hostpython_recipe = Recipe.get_recipe('hostpython2', self.ctx)
123123

124-
# AND: This hardcodes python version 2.7, needs fixing
124+
# This hardcodes python version 2.7, needs fixing
125125
env['BUILDLIB_PATH'] = join(
126126
hostpython_recipe.get_build_dir(self.arch),
127127
'build', 'lib.linux-{}-2.7'.format(uname()[-1]))

pythonforandroid/bootstrap.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ def get_bootstrap(cls, name, ctx):
178178
This is the only way you should access a bootstrap class, as
179179
it sets the bootstrap directory correctly.
180180
'''
181-
# AND: This method will need to check user dirs, and access
182-
BD94 # bootstraps in a slightly different way
183181
if name is None:
184182
return None
185183
if not hasattr(cls, 'bootstraps'):

pythonforandroid/bootstraps/pygame/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ def run_distribute(self):
4646

4747
info('Copying python distribution')
4848
hostpython = sh.Command(self.ctx.hostpython)
49-
# AND: This *doesn't* need to be in arm env?
5049
try:
5150
shprint(hostpython, '-OO', '-m', 'compileall', self.ctx.get_python_install_dir(),
5251
_tail=10, _filterout="^Listing")
@@ -64,7 +63,6 @@ def run_distribute(self):
6463
shprint(sh.cp, '-a', join('python-install', 'lib'), 'private')
6564
shprint(sh.mkdir, '-p', join('private', 'include', 'python2.7'))
6665

67-
# AND: Copylibs stuff should go here
6866
shprint(sh.mv, join('libs', arch.arch, 'libpymodules.so'), 'private/')
6967
shprint(sh.cp, join('python-install', 'include' , 'python2.7', 'pyconfig.h'), join('private', 'include', 'python2.7/'))
7068

pythonforandroid/bootstraps/sdl2/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def run_distribute(self):
6969
shprint(sh.mkdir, "-p",
7070
join("private", "include", "python2.7"))
7171

72-
# AND: Copylibs stuff should go here
7372
libpymodules_fn = join("libs", arch.arch, "libpymodules.so")
7473
if exists(libpymodules_fn):
7574
shprint(sh.mv, libpymodules_fn, 'private/')

pythonforandroid/bootstraps/sdl2/build/build.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,7 @@ def make_package(args):
237237
# construct a python27.zip
238238
make_python_zip()
239239

240-
# Package up the private and public data.
241-
# AND: Just private for now
240+
# Package up the private data (public not supported).
242241
tar_dirs = [args.private]
243242
if exists('private'):
244243
tar_dirs.append('private')

pythonforandroid/bootstraps/service_only/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ def run_distribute(self):
6161
shprint(sh.cp, '-a', join('python-install', 'lib'), 'private')
6262
shprint(sh.mkdir, '-p', join('private', 'include', 'python2.7'))
6363

64-
# AND: Copylibs stuff should go here
6564
if exists(join('libs', arch.arch, 'libpymodules.so')):
6665
shprint(sh.mv, join('libs', arch.arch, 'libpymodules.so'), 'private/')
6766
shprint(sh.cp, join('python-install', 'include', 'python2.7', 'pyconfig.h'), join('private', 'include', 'python2.7/'))

pythonforandroid/bootstraps/service_only/build/build.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
# pyc/py
4141
'*.pyc',
42-
# '*.py', # AND: Need to fix this to add it back
42+
# '*.py',
4343

4444
# temp files
4545
'~',
@@ -204,7 +204,7 @@ def compile_dir(dfn):
204204
Compile *.py in directory `dfn` to *.pyo
205205
'''
206206

207-
return # AND: Currently leaving out the compile to pyo step because it's somehow broken
207+
return # Currently leaving out the compile to pyo step because it's somehow broken
208208
# -OO = strip docstrings
209209
subprocess.call([PYTHON, '-OO', '-m', 'compileall', '-f', dfn])
210210

@@ -230,8 +230,7 @@ def make_package(args):
230230
# construct a python27.zip
231231
make_python_zip()
232232

233-
# Package up the private and public data.
234-
# AND: Just private for now
233+
# Package up the private data (public not supported).
235234
tar_dirs = [args.private]
236235
if exists('private'):
237236
tar_dirs.append('private')

pythonforandroid/bootstraps/webview/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def run_distribute(self):
5757
shprint(sh.cp, '-a', join('python-install', 'lib'), 'private')
5858
shprint(sh.mkdir, '-p', join('private', 'include', 'python2.7'))
5959

60-
# AND: Copylibs stuff should go here
6160
if exists(join('libs', arch.arch, 'libpymodules.so')):
6261
shprint(sh.mv, join('libs', arch.arch, 'libpymodules.so'), 'private/')
6362
shprint(sh.cp, join('python-install', 'include' , 'python2.7', 'pyconfig.h'), join('private', 'include', 'python2.7/'))

pythonforandroid/bootstraps/webview/build/build.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# pyc/py
4040
'*.pyc',
41-
# '*.py', # AND: Need to fix this to add it back
41+
# '*.py',
4242

4343
# temp files
4444
'~',
@@ -203,7 +203,7 @@ def compile_dir(dfn):
203203
Compile *.py in directory `dfn` to *.pyo
204204
'''
205205

206-
return # AND: Currently leaving out the compile to pyo step because it's somehow broken
206+
return # Currently leaving out the compile to pyo step because it's somehow broken
207207
# -OO = strip docstrings
208208
subprocess.call([PYTHON, '-OO', '-m', 'compileall', '-f', dfn])
209209

@@ -229,8 +229,7 @@ def make_package(args):
229229
# construct a python27.zip
230230
make_python_zip()
231231

232-
# Package up the private and public data.
233-
# AND: Just private for now
232+
# Package up the private data (public not supported).
234233
tar_dirs = [args.private]
235234
if exists('private'):
236235
tar_dirs.append('private')

pythonforandroid/build.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,6 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
173173
if self._build_env_prepared:
174174
return
175175

176-
# AND: This needs revamping to carefully check each dependency
177-
# in turn
178176
ok = True
179177

180178
# Work out where the Android SDK is
@@ -186,7 +184,7 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
186184
if sdk_dir is None: # This seems used more conventionally
187185
sdk_dir = environ.get('ANDROID_HOME', None)
188186
if sdk_dir is None: # Checks in the buildozer SDK dir, useful
189-
# # for debug tests of p4a
187+
# for debug tests of p4a
190188
possible_dirs = glob.glob(expanduser(join(
191189
'~', '.buildozer', 'android', 'platform', 'android-sdk-*')))
192190
possible_dirs = [d for d in possible_dirs if not
@@ -325,8 +323,9 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
325323
warning('If the NDK dir result is correct, you don\'t '
326324
'need to manually set the NDK ver.')
327325
if ndk_ver is None:
328-
warning('Android NDK version could not be found, exiting.')
329-
exit(1)
326+
warning('Android NDK version could not be found. This probably'
327+
'won\'t cause any problems, but if necessary you can'
328+
'set it with `--ndk-version=...`.')
330329
self.ndk_ver = ndk_ver
331330

332331
info('Using {} NDK {}'.format(self.ndk.capitalize(), self.ndk_ver))
@@ -361,7 +360,7 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
361360
ok = False
362361
warning("Missing requirement: cython is not installed")
363362

364-
# AND: need to change if supporting multiple archs at once
363+
# This would need to be changed if supporting multiarch APKs
365364
arch = self.archs[0]
366365
platform_dir = arch.platform_dir
367366
toolchain_prefix = arch.toolchain_prefix
@@ -498,7 +497,7 @@ def get_site_packages_dir(self, arch=None):
498497
dir.
499498
'''
500499

501-
# AND: This *must* be replaced with something more general in
500+
# This needs to be replaced with something more general in
502501
# order to support multiple python versions and/or multiple
503502
# archs.
504503
if self.python_recipe.from_crystax:
@@ -577,7 +576,6 @@ def build_recipes(build_order, python_modules, ctx):
577576
.format(recipe.name))
578577

579578
# 4) biglink everything
580-
# AND: Should make this optional
581579
info_main('# Biglinking object files')
582580
if not ctx.python_recipe or not ctx.python_recipe.from_crystax:
583581
biglink(ctx, arch)

0 commit comments

Comments
 (0)
0