aboutsummaryrefslogtreecommitdiffstats
path: root/python/installer.go
diff options
context:
space:
mode:
authorNan Zhang <nanzhang@google.com>2017-12-01 06:19:27 +0000
committerNan Zhang <nanzhang@google.com>2017-12-01 06:19:27 +0000
commit0a32e5936b4c87bc705d06fa2d4f6fed1f58d602 (patch)
treeb614604c99116d2f0b66a6894cc4bce74e001613 /python/installer.go
parent3bba05962dc4329c6e3d28544775db591574ba7b (diff)
downloadbuild_soong-0a32e5936b4c87bc705d06fa2d4f6fed1f58d602.tar.gz
build_soong-0a32e5936b4c87bc705d06fa2d4f6fed1f58d602.tar.bz2
build_soong-0a32e5936b4c87bc705d06fa2d4f6fed1f58d602.zip
Revert "Change Python in Soong to support device side build."
This reverts commit 3bba05962dc4329c6e3d28544775db591574ba7b. Reason for revert: <revert mac builds> Change-Id: I25f1380573d69f7e111287624a2d4a3d95fdd86b
Diffstat (limited to 'python/installer.go')
-rw-r--r--python/installer.go31
1 files changed, 5 insertions, 26 deletions
diff --git a/python/installer.go b/python/installer.go
index ab3d9b4a..04698c55 100644
--- a/python/installer.go
+++ b/python/installer.go
@@ -15,47 +15,26 @@
package python
import (
- "path/filepath"
-
"android/soong/android"
)
// This file handles installing python executables into their final location
-type installLocation int
-
-const (
- InstallInData installLocation = iota
-)
-
type pythonInstaller struct {
- dir string
- dir64 string
- relative string
+ dir string
path android.OutputPath
}
-func NewPythonInstaller(dir, dir64 string) *pythonInstaller {
+func NewPythonInstaller(dir string) *pythonInstaller {
return &pythonInstaller{
- dir: dir,
- dir64: dir64,
+ dir: dir,
}
}
var _ installer = (*pythonInstaller)(nil)
-func (installer *pythonInstaller) installDir(ctx android.ModuleContext) android.OutputPath {
- dir := installer.dir
- if ctx.Arch().ArchType.Multilib == "lib64" && installer.dir64 != "" {
- dir = installer.dir64
- }
- if !ctx.Host() && !ctx.Arch().Native {
- dir = filepath.Join(dir, ctx.Arch().ArchType.String())
- }
- return android.PathForModuleInstall(ctx, dir, installer.relative)
-}
-
func (installer *pythonInstaller) install(ctx android.ModuleContext, file android.Path) {
- installer.path = ctx.InstallFile(installer.installDir(ctx), file.Base(), file)
+ installer.path = ctx.InstallFile(android.PathForModuleInstall(ctx, installer.dir),
+ file.Base(), file)
}