Skip to content

Commit 48eb6e8

Browse files
committed
Made system python compileall option work only with python2
1 parent dd965f8 commit 48eb6e8

File tree

1 file changed

+8
-7
lines changed
  • pythonforandroid/bootstraps/sdl2/build

1 file changed

+8
-7
lines changed

pythonforandroid/bootstraps/sdl2/build/build.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -530,13 +530,14 @@ def parse_args(args=None):
530530
if args.try_system_python_compile:
531531
# Hardcoding python2.7 is okay for now, as python3 skips the
532532
# compilation anyway
533-
python_executable = 'python2.7'
534-
try:
535-
subprocess.call([python_executable, '--version'])
536-
except (OSError, subprocess.CalledProcessError):
537-
pass
538-
else:
539-
PYTHON = python_executable
533+
if not exists('crystax_python'):
534+
python_executable = 'python2.7'
535+
try:
536+
subprocess.call([python_executable, '--version'])
537+
except (OSError, subprocess.CalledProcessError):
538+
pass
539+
else:
540+
PYTHON = python_executable
540541

541542
if args.no_compile_pyo:
542543
PYTHON = None

0 commit comments

Comments
 (0)