aboutsummaryrefslogtreecommitdiff
path: root/checkbuild.py
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2015-11-13 15:09:44 -0800
committerJosh Gao <jmgao@google.com>2015-11-13 15:43:06 -0800
commita80b43d218f7a9f0b85c44e6529ee1e468437466 (patch)
treef0f6a20607fe4aa0a3fad66bb0e3aa163d84e20e /checkbuild.py
parent196ca32a6237cd04fc5354eb66e7ee58cac8c756 (diff)
downloadndk-a80b43d218f7a9f0b85c44e6529ee1e468437466.tar.gz
Create python_packages package with adb/gdbrunner/ndk-gdb.
Bug: http://b/25561370 Change-Id: Ia85189c6a60c47d77f5c4dd02f071366f023ef61
Diffstat (limited to 'checkbuild.py')
-rw-r--r--checkbuild.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/checkbuild.py b/checkbuild.py
index 72d09f573..63a9b4714 100644
--- a/checkbuild.py
+++ b/checkbuild.py
@@ -51,6 +51,7 @@ ALL_MODULES = {
'native_app_glue',
'ndk_helper',
'platforms',
+ 'python_packages',
'stlport',
'tests',
}
@@ -478,6 +479,33 @@ def build_build(out_dir, _):
build_support.make_package('build', files, out_dir, root_dir,
repo_prop_dir='build')
+def build_python_packages(out_dir, _):
+ root_dir = build_support.ndk_path()
+ files = [
+ 'ndk-gdb',
+ 'ndk-gdb.cmd',
+ 'ndk-gdb.py',
+ '../development/python-packages',
+ ]
+
+ # Stage the files in a temporary directory to make things easier.
+ temp_dir = tempfile.mkdtemp()
+ def copy(path):
+ if os.path.isdir(path):
+ shutil.copytree(path, os.path.join(temp_dir, os.path.basename(path)))
+ else:
+ shutil.copy(path, temp_dir)
+
+ try:
+ files = [os.path.join(root_dir, path) for path in files]
+ for f in files:
+ copy(f)
+ files = [os.path.basename(path) for path in files]
+ build_support.make_package('python_packages', files, out_dir, temp_dir,
+ repo_prop_dir='python-packages')
+ finally:
+ shutil.rmtree(temp_dir)
+
def main():
args = ArgParser().parse_args()
@@ -528,6 +556,7 @@ def main():
('native_app_glue', build_native_app_glue),
('ndk_helper', build_ndk_helper),
('platforms', build_platforms),
+ ('python_packages', build_python_packages),
('stlport', build_stlport),
('tests', build_tests),
])