diff options
author | 2021-11-03 09:07:26 +0000 | |
---|---|---|
committer | 2021-11-03 09:07:26 +0000 | |
commit | ffc4cc41a36ab55e8ac0adc78a22e9ec0712f535 (patch) | |
tree | 15b322f16465a351b56cde35968eb17d549e70b9 /python | |
parent | 664a4fd0afde4ff4359022f5c23e6fcb6f08aa16 (diff) |
Revert "Fix python_binary_host module in mixed build."
Revert submission 1861755-fix_python_binary_host_in_mixed_build
Reason for revert: Broke Bazel CI, please see https://android-build.googleplex.com/builds/submitted/7879108/mixed_droid-clean/latest/view/logs/build_error.log and https://android-build.googleplex.com/builds/submitted/7879108/mixed_droid-incremental/latest/view/logs/build_error.log
Reverted Changes:
Ica457ee71:Add platform needed by python_binary_host.
Ibc8b99a92:Fix python_binary_host module in mixed build.
Change-Id: I3d6c4f6edee2d00bdc78efd5cee64f4c915baeaa
Diffstat (limited to 'python')
-rw-r--r-- | python/binary.go | 2 | ||||
-rw-r--r-- | python/installer.go | 17 | ||||
-rw-r--r-- | python/test.go | 2 |
3 files changed, 6 insertions, 15 deletions
diff --git a/python/binary.go b/python/binary.go index 304c9a98b..bf6167c3c 100644 --- a/python/binary.go +++ b/python/binary.go @@ -143,7 +143,7 @@ var ( func NewBinary(hod android.HostOrDeviceSupported) (*Module, *binaryDecorator) { module := newModule(hod, android.MultilibFirst) - decorator := &binaryDecorator{pythonInstaller: NewPythonInstaller("bin", "", module)} + decorator := &binaryDecorator{pythonInstaller: NewPythonInstaller("bin", "")} module.bootstrapper = decorator module.installer = decorator diff --git a/python/installer.go b/python/installer.go index 515cc47f2..396f03667 100644 --- a/python/installer.go +++ b/python/installer.go @@ -36,14 +36,12 @@ type pythonInstaller struct { path android.InstallPath androidMkSharedLibs []string - module *Module } -func NewPythonInstaller(dir, dir64 string, module *Module) *pythonInstaller { +func NewPythonInstaller(dir, dir64 string) *pythonInstaller { return &pythonInstaller{ - dir: dir, - dir64: dir64, - module: module, + dir: dir, + dir64: dir64, } } @@ -61,14 +59,7 @@ func (installer *pythonInstaller) installDir(ctx android.ModuleContext) android. } func (installer *pythonInstaller) install(ctx android.ModuleContext, file android.Path) { - if ctx.ModuleType() == "python_binary_host" && installer.module.MixedBuildsEnabled(ctx) { - label := installer.module.BazelModuleBase.GetBazelLabel(ctx, installer.module) - binary, _ := ctx.Config().BazelContext.GetPythonBinary(label, android.GetConfigKey(ctx)) - bazelBinaryOutPath := android.PathForBazelOut(ctx, binary) - installer.path = ctx.InstallFile(installer.installDir(ctx), bazelBinaryOutPath.Base(), bazelBinaryOutPath) - } else { - installer.path = ctx.InstallFile(installer.installDir(ctx), file.Base(), file) - } + installer.path = ctx.InstallFile(installer.installDir(ctx), file.Base(), file) } func (installer *pythonInstaller) setAndroidMkSharedLibs(sharedLibs []string) { diff --git a/python/test.go b/python/test.go index 3cd900f4c..7413782cb 100644 --- a/python/test.go +++ b/python/test.go @@ -101,7 +101,7 @@ func (test *testDecorator) install(ctx android.ModuleContext, file android.Path) func NewTest(hod android.HostOrDeviceSupported) *Module { module, binary := NewBinary(hod) - binary.pythonInstaller = NewPythonInstaller("nativetest", "nativetest64", module) + binary.pythonInstaller = NewPythonInstaller("nativetest", "nativetest64") test := &testDecorator{binaryDecorator: binary} if hod == android.HostSupportedNoCross && test.testProperties.Test_options.Unit_test == nil { |