8000 Removed references to ctx.ndk_is_crystax · latin1593/python-for-android@990097d · GitHub
[go: up one dir, main page]

Skip to content

Commit 990097d

Browse files
committed
Removed references to ctx.ndk_is_crystax
1 parent cf16807 commit 990097d

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

pythonforandroid/bootstrap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ def _unpack_aar(self, aar, arch):
235235

236236
def strip_libraries(self, arch):
237237
info('Stripping libraries')
238-
if self.ctx.ndk_is_crystax:
239-
info('NDK is CrystaX, skipping')
238+
if self.ctx.python_recipe.from_crystax:
239+
info('Python was loaded from CrystaX, skipping strip')
240240
return
241241
env = arch.get_env()
242242
strip = which('arm-linux-androideabi-strip', env['PATH'])

pythonforandroid/bootstraps/sdl2/__init__.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ def run_distribute(self):
2828
with current_directory(self.dist_dir):
2929
info('Copying python distribution')
3030

31-
if not exists('private') and not self.ctx.ndk_is_crystax:
31+
if not exists('private') and not self.ctx.python_recipe.from_crystax:
3232
shprint(sh.mkdir, 'private')
33-
if not exists('crystax_python') and self.ctx.ndk_is_crystax:
33+
if not exists('crystax_python') and self.ctx.python_recipe.from_crystax:
3434
shprint(sh.mkdir, 'crystax_python')
3535
shprint(sh.mkdir, 'crystax_python/crystax_python')
3636
if not exists('assets'):
3737
shprint(sh.mkdir, 'assets')
3838

3939
hostpython = sh.Command(self.ctx.hostpython)
40-
if not self.ctx.ndk_is_crystax:
40+
if not self.ctx.python_recipe.from_crystax:
4141
shprint(hostpython, '-OO', '-m', 'compileall',
4242
self.ctx.get_python_install_dir(),
4343
_tail=10, _filterout="^Listing", _critical=True)
@@ -48,7 +48,7 @@ def run_distribute(self):
4848
self.distribute_aars(arch)
4949
self.distribute_javaclasses(self.ctx.javaclass_dir)
5050

51-
if not self.ctx.ndk_is_crystax:
51+
if not self.ctx.python_recipe.from_crystax:
5252
info('Filling private directory')
5353
if not exists(join('private', 'lib')):
5454
info('private/lib does not exist, making')
@@ -85,9 +85,10 @@ def run_distribute(self):
8585
# shprint(sh.rm, '-rf', 'lib-dynload/_ctypes_test.so')
8686
# shprint(sh.rm, '-rf', 'lib-dynload/_testcapi.so')
8787

88-
else: # NDK *is* crystax
88+
else: # Python *is* loaded from crystax
8989
ndk_dir = self.ctx.ndk_dir
90-
python_dir = join(ndk_dir, 'sources', 'python', '3.5',
90+
py_recipe = self.ctx.python_recipe
91+
python_dir = join(ndk_dir, 'sources', 'python', py_recipe.version,
9192
'libs', arch.arch)
9293

9394
shprint(sh.cp, '-r', join(python_dir, 'stdlib.zip'), 'crystax_python/crystax_python')

pythonforandroid/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ def build_recipes(build_order, python_modules, ctx):
554554
# 4) biglink everything
555555
# AND: Should make this optional
556556
info_main('# Biglinking object files')
557-
if not ctx.ndk_is_crystax:
557+
if not ctx.python_recipe.from_crystax:
558558
biglink(ctx, arch)
559559
else:
560560
info('NDK is crystax, skipping biglink (will this work?)')

pythonforandroid/recipe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ def install_python_package(self, arch, name=None, env=None, is_dir=True):
722722
# hostpython = sh.Command('python3.5')
723723

724724

725-
if self.ctx.ndk_is_crystax:
725+
if self.ctx.python_recipe.from_crystax:
726726
# hppath = join(dirname(self.hostpython_location), 'Lib',
727727
# 'site-packages')
728728
hpenv = env.copy()
@@ -856,7 +856,7 @@ def build_cython_components(self, arch):
856856

857857
if manually_cythonise:
858858
info('Running cython where appropriate')
859-
if self.ctx.ndk_is_crystax:
859+
if self.ctx.python_recipe.from_crystax:
860860
shprint(sh.find, self.get_build_dir(arch.arch), '-iname', '*.pyx',
861861
'-exec', 'cython', '{}', ';')
862862
# AND: Need to choose cython version more carefully

pythonforandroid/recipes/python3/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class Python3Recipe(Recipe):
1515

1616
def __init__(self, **kwargs):
1717
super(Python3Recipe, self).__init__(**kwargs)
18-
self.crystax = lambda *args: True if self.ctx.ndk_is_crystax else False
1918

2019
def prebuild_arch(self, arch):
2120
build_dir = self.get_build_container_dir(arch.arch)

0 commit comments

Comments
 (0)
0