Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pythonforandroid/recipes/hostpython3crystax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@


class Hostpython3Recipe(Recipe):
version = '3.5'
# url = 'http://python.org/ftp/python/{version}/Python-{version}.tgz'
# url = 'https://github.com/crystax/android-vendor-python-3-5/archive/master.zip'
version = 'auto' # the version is taken from the python3crystax recipe
name = 'hostpython3crystax'

conflicts = ['hostpython2']
Expand Down Expand Up @@ -36,6 +34,10 @@ def build_arch(self, arch):
shprint(sh.mkdir, '-p', sub_build_dir)
python3crystax = self.get_recipe('python3crystax', self.ctx)
system_python = sh.which("python" + python3crystax.version)
if system_python is None:
raise OSError(
('Trying to use python3crystax=={} but this Python version '
'is not installed locally.').format(python3crystax.version))
link_dest = join(self.get_build_dir(), 'hostpython')
shprint(sh.ln, '-sf', system_python, link_dest)

Expand Down