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
This commit is contained in:
@@ -39,7 +39,7 @@ func (p *Module) subAndroidMk(data *android.AndroidMkData, obj interface{}) {
|
||||
}
|
||||
|
||||
func (p *Module) AndroidMk() android.AndroidMkData {
|
||||
ret := android.AndroidMkData{}
|
||||
ret := android.AndroidMkData{OutputFile: p.installSource}
|
||||
|
||||
p.subAndroidMk(&ret, p.installer)
|
||||
|
||||
@@ -55,7 +55,7 @@ func (p *binaryDecorator) AndroidMk(base *Module, ret *android.AndroidMkData) {
|
||||
strings.Join(p.binaryProperties.Test_suites, " "))
|
||||
}
|
||||
})
|
||||
base.subAndroidMk(ret, p.baseInstaller)
|
||||
base.subAndroidMk(ret, p.pythonInstaller)
|
||||
}
|
||||
|
||||
func (p *testDecorator) AndroidMk(base *Module, ret *android.AndroidMkData) {
|
||||
@@ -67,7 +67,7 @@ func (p *testDecorator) AndroidMk(base *Module, ret *android.AndroidMkData) {
|
||||
strings.Join(p.binaryDecorator.binaryProperties.Test_suites, " "))
|
||||
}
|
||||
})
|
||||
base.subAndroidMk(ret, p.binaryDecorator.baseInstaller)
|
||||
base.subAndroidMk(ret, p.binaryDecorator.pythonInstaller)
|
||||
}
|
||||
|
||||
func (installer *pythonInstaller) AndroidMk(base *Module, ret *android.AndroidMkData) {
|
||||
|
Reference in New Issue
Block a user