aboutsummaryrefslogtreecommitdiffstats
path: root/python/scripts/stub_template_host.txt
diff options
context:
space:
mode:
authorNan Zhang <nanzhang@google.com>2018-05-31 12:49:33 -0700
committerNan Zhang <nanzhang@google.com>2018-06-04 12:32:55 -0700
commitbea0975f1882a8741dc3e9abe2bd69f7067953db (patch)
treec561f9cb883ba11a31a69e5a02f735d4d9a926d9 /python/scripts/stub_template_host.txt
parent1d2318d6cd9b7f64178afb4e3a8ce481dd603bbf (diff)
downloadandroid_build_soong-bea0975f1882a8741dc3e9abe2bd69f7067953db.tar.gz
android_build_soong-bea0975f1882a8741dc3e9abe2bd69f7067953db.tar.bz2
android_build_soong-bea0975f1882a8741dc3e9abe2bd69f7067953db.zip
Fix embedded_launcher can't find files
The problem came from Python libraries doesn't know the information that we enabled embedded_launcher (only Python binary knows about that). And we can't simply remove runfiles dir for Python libraries since host Python mode need this. Bug: b/80441699 Test: m perf_profo_flames Change-Id: I73ffc4d7504f95a708ae7cca47bc6c15a673aa31
Diffstat (limited to 'python/scripts/stub_template_host.txt')
-rw-r--r--python/scripts/stub_template_host.txt5
1 files changed, 2 insertions, 3 deletions
diff --git a/python/scripts/stub_template_host.txt b/python/scripts/stub_template_host.txt
index 386298eb..e6862114 100644
--- a/python/scripts/stub_template_host.txt
+++ b/python/scripts/stub_template_host.txt
@@ -11,7 +11,6 @@ import zipfile
PYTHON_BINARY = '%interpreter%'
MAIN_FILE = '%main%'
PYTHON_PATH = 'PYTHONPATH'
-ZIP_RUNFILES_DIRECTORY_NAME = 'runfiles'
def SearchPathEnv(name):
search_path = os.getenv('PATH', os.defpath).split(os.pathsep)
@@ -36,7 +35,7 @@ def ExtractRunfiles():
temp_dir = tempfile.mkdtemp("", "Soong.python_")
zf = zipfile.ZipFile(os.path.dirname(__file__))
zf.extractall(temp_dir)
- return os.path.join(temp_dir, ZIP_RUNFILES_DIRECTORY_NAME)
+ return temp_dir
def Main():
args = sys.argv[1:]
@@ -83,7 +82,7 @@ def Main():
except:
raise
finally:
- shutil.rmtree(os.path.dirname(runfiles_path), True)
+ shutil.rmtree(runfiles_path, True)
if __name__ == '__main__':
Main()