Skip to content

Commit 6b9220c

Browse files
committed
make it work without install to python system
1 parent d974ba3 commit 6b9220c

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

pythonforandroid/toolchain.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@
55
66
This module defines the entry point for command line and programmatic use.
77
"""
8-
98
from __future__ import print_function
109

10+
import sys
11+
import os
12+
13+
current_path = os.path.dirname(os.path.abspath(__file__))
14+
root_path = os.path.abspath( os.path.join(current_path, os.pardir))
15+
sys.path.append(root_path)
16+
17+
1118
def check_python_dependencies():
1219
# Check if the Python requirements are installed. This appears
1320
# before the imports because otherwise they're imported elsewhere.
@@ -591,7 +598,7 @@ def clean(self, args):
591598
'Asked to clean "{}" but this argument is not '
592599
'recognised'.format(component)))
593600
component_clean_methods[component](args)
594-
601+
595602

596603
def clean_all(self, args):
597604
'''Delete all build components; the package cache, package builds,

0 commit comments

Comments
 (0)