Created
October 28, 2018 23:43
-
-
Save AndreMiras/f6a91222e58dae41ea09e74fbe9b0b74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pythonforandroid/build.py b/pythonforandroid/build.py | |
index e05bfe72..176d5542 100644 | |
--- a/pythonforandroid/build.py | |
+++ b/pythonforandroid/build.py | |
@@ -627,7 +627,7 @@ def run_pymodules_install(ctx, modules): | |
venv = sh.Command(ctx.virtualenv) | |
with current_directory(join(ctx.build_dir)): | |
shprint(venv, | |
- '--python=python{}'.format(ctx.python_recipe.major_minor_version_string()), | |
+ '--python=python{}'.format(ctx.python_recipe.major_minor_version_string), | |
'venv') | |
info('Creating a requirements.txt file for the Python modules') | |
diff --git a/pythonforandroid/recipes/hostpython3crystax/__init__.py b/pythonforandroid/recipes/hostpython3crystax/__init__.py | |
index e4d0c8eb..edf2c7ff 100644 | |
--- a/pythonforandroid/recipes/hostpython3crystax/__init__.py | |
+++ b/pythonforandroid/recipes/hostpython3crystax/__init__.py | |
@@ -3,7 +3,7 @@ from os.path import join | |
import sh | |
-class Hostpython3Recipe(Recipe): | |
+class Hostpython3CrystaxRecipe(Recipe): | |
version = 'auto' # the version is taken from the python3crystax recipe | |
name = 'hostpython3crystax' | |
@@ -41,4 +41,4 @@ class Hostpython3Recipe(Recipe): | |
shprint(sh.ln, '-sf', system_python, link_dest) | |
-recipe = Hostpython3Recipe() | |
+recipe = Hostpython3CrystaxRecipe() | |
diff --git a/pythonforandroid/recipes/python3crystax/__init__.py b/pythonforandroid/recipes/python3crystax/__init__.py | |
index b190beed..f4934b1a 100644 | |
--- a/pythonforandroid/recipes/python3crystax/__init__.py | |
+++ b/pythonforandroid/recipes/python3crystax/__init__.py | |
@@ -11,7 +11,7 @@ prebuilt_download_locations = { | |
'releases/download/0.1/crystax_python_3.6_armeabi_armeabi-v7a.tar.gz')} | |
-class Python3Recipe(TargetPythonRecipe): | |
+class Python3CrystaxRecipe(TargetPythonRecipe): | |
version = '3.6' | |
url = '' | |
name = 'python3crystax' | |
@@ -22,7 +22,7 @@ class Python3Recipe(TargetPythonRecipe): | |
from_crystax = True | |
def get_dir_name(self): | |
- name = super(Python3Recipe, self).get_dir_name() | |
+ name = super(Python3CrystaxRecipe, self).get_dir_name() | |
name += '-version{}'.format(self.version) | |
return name | |
@@ -86,16 +86,16 @@ class Python3Recipe(TargetPythonRecipe): | |
join(dirn, 'site-packages')) | |
info('Renaming .so files to reflect cross-compile') | |
- self.reduce_object_file_names(self, join(dirn, "site-packages")) | |
+ self.reduce_object_file_names(join(dirn, "site-packages")) | |
return join(dirn, 'site-packages') | |
def include_root(self, arch_name): | |
- return join(self.ctx.ndk_dir, 'sources', 'python', self.major_minor_version_string(), | |
+ return join(self.ctx.ndk_dir, 'sources', 'python', self.major_minor_version_string, | |
'include', 'python') | |
def link_root(self, arch_name): | |
- return join(self.ctx.ndk_dir, 'sources', 'python', self.major_minor_version_string(), | |
+ return join(self.ctx.ndk_dir, 'sources', 'python', self.major_minor_version_string, | |
'libs', arch_name) | |
-recipe = Python3Recipe() | |
+recipe = Python3CrystaxRecipe() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pythonforandroid/build.py b/pythonforandroid/build.py | |
index e05bfe72..176d5542 100644 | |
--- a/pythonforandroid/build.py | |
+++ b/pythonforandroid/build.py | |
@@ -627,7 +627,7 @@ def run_pymodules_install(ctx, modules): | |
venv = sh.Command(ctx.virtualenv) | |
with current_directory(join(ctx.build_dir)): | |
shprint(venv, | |
- '--python=python{}'.format(ctx.python_recipe.major_minor_version_string()), | |
+ '--python=python{}'.format(ctx.python_recipe.major_minor_version_string), | |
'venv') | |
info('Creating a requirements.txt file for the Python modules') | |
diff --git a/pythonforandroid/recipes/hostpython3crystax/__init__.py b/pythonforandroid/recipes/hostpython3crystax/__init__.py | |
index e4d0c8eb..edf2c7ff 100644 | |
--- a/pythonforandroid/recipes/hostpython3crystax/__init__.py | |
+++ b/pythonforandroid/recipes/hostpython3crystax/__init__.py | |
@@ -3,7 +3,7 @@ from os.path import join | |
import sh | |
-class Hostpython3Recipe(Recipe): | |
+class Hostpython3CrystaxRecipe(Recipe): | |
version = 'auto' # the version is taken from the python3crystax recipe | |
name = 'hostpython3crystax' | |
@@ -41,4 +41,4 @@ class Hostpython3Recipe(Recipe): | |
shprint(sh.ln, '-sf', system_python, link_dest) | |
-recipe = Hostpython3Recipe() | |
+recipe = Hostpython3CrystaxRecipe() | |
diff --git a/pythonforandroid/recipes/python3crystax/__init__.py b/pythonforandroid/recipes/python3crystax/__init__.py | |
index b190beed..f4934b1a 100644 | |
--- a/pythonforandroid/recipes/python3crystax/__init__.py | |
+++ b/pythonforandroid/recipes/python3crystax/__init__.py | |
@@ -11,7 +11,7 @@ prebuilt_download_locations = { | |
'releases/download/0.1/crystax_python_3.6_armeabi_armeabi-v7a.tar.gz')} | |
-class Python3Recipe(TargetPythonRecipe): | |
+class Python3CrystaxRecipe(TargetPythonRecipe): | |
version = '3.6' | |
url = '' | |
name = 'python3crystax' | |
@@ -22,7 +22,7 @@ class Python3Recipe(TargetPythonRecipe): | |
from_crystax = True | |
def get_dir_name(self): | |
- name = super(Python3Recipe, self).get_dir_name() | |
+ name = super(Python3CrystaxRecipe, self).get_dir_name() | |
name += '-version{}'.format(self.version) | |
return name | |
@@ -86,16 +86,16 @@ class Python3Recipe(TargetPythonRecipe): | |
join(dirn, 'site-packages')) | |
info('Renaming .so files to reflect cross-compile') | |
- self.reduce_object_file_names(self, join(dirn, "site-packages")) | |
+ self.reduce_object_file_names(join(dirn, "site-packages")) | |
return join(dirn, 'site-packages') | |
def include_root(self, arch_name): | |
- return join(self.ctx.ndk_dir, 'sources', 'python', self.major_minor_version_string(), | |
+ return join(self.ctx.ndk_dir, 'sources', 'python', self.major_minor_version_string, | |
'include', 'python') | |
def link_root(self, arch_name): | |
- return join(self.ctx.ndk_dir, 'sources', 'python', self.major_minor_version_string(), | |
+ return join(self.ctx.ndk_dir, 'sources', 'python', self.major_minor_version_string, | |
'libs', arch_name) | |
-recipe = Python3Recipe() | |
+recipe = Python3CrystaxRecipe() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment