From 3bba05962dc4329c6e3d28544775db591574ba7b Mon Sep 17 00:00:00 2001 From: Nan Zhang Date: Wed, 15 Nov 2017 17:59:56 -0800 Subject: Change Python in Soong to support device side build. Add python_test to generate executables for both host and device side. And change python_library_host to python_library. installation for python device test will be under target/product/generic_arm[64]/data/nativetest[64]. Bug: b/69114465 Test: m clean && m -j Device Test: adb root; adb push nan_devicetest /data; adb shell; ./nan_devicetest print(sys.path) ['/data/nan_devicetest/runfiles', '/data/nan_devicetest', '/data/nan_devicetest/internal', '/data/nan_devicetest/internal/stdlib'] Change-Id: If8317070a3aa1b6dab2e84b8df2d037f495d7247 --- python/binary.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'python/binary.go') diff --git a/python/binary.go b/python/binary.go index 14c49527..457c7fa0 100644 --- a/python/binary.go +++ b/python/binary.go @@ -49,24 +49,20 @@ type BinaryProperties struct { type binaryDecorator struct { binaryProperties BinaryProperties - baseInstaller *pythonInstaller + *pythonInstaller } type IntermPathProvider interface { IntermPathForModuleOut() android.OptionalPath } -func (binary *binaryDecorator) install(ctx android.ModuleContext, file android.Path) { - binary.baseInstaller.install(ctx, file) -} - var ( stubTemplateHost = "build/soong/python/scripts/stub_template_host.txt" ) func NewBinary(hod android.HostOrDeviceSupported) (*Module, *binaryDecorator) { module := newModule(hod, android.MultilibFirst) - decorator := &binaryDecorator{baseInstaller: NewPythonInstaller("bin")} + decorator := &binaryDecorator{pythonInstaller: NewPythonInstaller("bin", "")} module.bootstrapper = decorator module.installer = decorator -- cgit v1.2.3