Skip to content

Commit f113131

Browse files
committed
Cleaned up code per review comments
1 parent b3cd815 commit f113131

4 files changed

Lines changed: 8 additions & 9 deletions

File tree

pythonforandroid/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ def run_pymodules_install(ctx, modules):
627627
venv = sh.Command(ctx.virtualenv)
628628
with current_directory(join(ctx.build_dir)):
629629
shprint(venv,
630-
'--python=python{}'.format(ctx.python_recipe.major_minor_version_string()),
630+
'--python=python{}'.format(ctx.python_recipe.major_minor_version_string),
631631
'venv')
632632

633633
info('Creating a requirements.txt file for the Python modules')

pythonforandroid/recipes/hostpython3crystax/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sh
44

55

6-
class Hostpython3Recipe(Recipe):
6+
class Hostpython3CrystaXRecipe(Recipe):
77
version = 'auto' # the version is taken from the python3crystax recipe
88
name = 'hostpython3crystax'
99

@@ -41,4 +41,4 @@ def build_arch(self, arch):
4141
shprint(sh.ln, '-sf', system_python, link_dest)
4242

4343

44-
recipe = Hostpython3Recipe()
44+
recipe = Hostpython3CrystaXRecipe()

pythonforandroid/recipes/python3crystax/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
'releases/download/0.1/crystax_python_3.6_armeabi_armeabi-v7a.tar.gz')}
1212

1313

14-
class Python3Recipe(TargetPythonRecipe):
14+
class Python3CrystaXRecipe(TargetPythonRecipe):
1515
version = '3.6'
1616
url = ''
1717
name = 'python3crystax'
@@ -86,16 +86,16 @@ def create_python_bundle(self, dirn, arch):
8686
join(dirn, 'site-packages'))
8787

8888
info('Renaming .so files to reflect cross-compile')
89-
self.reduce_object_file_names(self, join(dirn, "site-packages"))
89+
self.reduce_object_file_names(join(dirn, "site-packages"))
9090

9191
return join(dirn, 'site-packages')
9292

9393
def include_root(self, arch_name):
94-
return join(self.ctx.ndk_dir, 'sources', 'python', self.major_minor_version_string(),
94+
return join(self.ctx.ndk_dir, 'sources', 'python', self.major_minor_version_string,
9595
'include', 'python')
9696

9797
def link_root(self, arch_name):
98-
return join(self.ctx.ndk_dir, 'sources', 'python', self.major_minor_version_string(),
98+
return join(self.ctx.ndk_dir, 'sources', 'python', self.major_minor_version_string,
9999
'libs', arch_name)
100100

101-
recipe = Python3Recipe()
101+
recipe = Python3CrystaXRecipe()

pythonforandroid/recipes/sdl2/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def get_recipe_env(self, arch=None):
2020

2121
py2 = self.get_recipe('python2', arch.ctx)
2222
env['PYTHON2_NAME'] = py2.get_dir_name()
23-
py3 = self.get_recipe('python3', arch.ctx)
2423

2524
env['PYTHON_INCLUDE_ROOT'] = self.ctx.python_recipe.include_root(arch.arch)
2625
env['PYTHON_LINK_ROOT'] = self.ctx.python_recipe.link_root(arch.arch)

0 commit comments

Comments
 (0)