aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/python.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/internal/rosa/python.go b/internal/rosa/python.go
index 4af5c0ef..cfd2a22f 100644
--- a/internal/rosa/python.go
+++ b/internal/rosa/python.go
@@ -85,6 +85,10 @@ func init() {
type PipHelper struct {
// Whether to omit --no-build-isolation.
BuildIsolation bool
+ // Whether to enter source after install.
+ EnterSource bool
+ // Runs after install.
+ Script string
}
var _ Helper = new(PipHelper)
@@ -119,12 +123,18 @@ func (attr *PipHelper) script(name string) string {
--no-build-isolation \`
}
+ script := attr.Script
+ if attr.EnterSource {
+ script = "cd '/usr/src/" + name + "'\n" + script
+ }
+
return `
pip3 install \
--no-index \
--prefix=/system \
--root=/work \` + extra + `
- '/usr/src/` + name + `'`
+ '/usr/src/` + name + `'
+` + script
}
// newViaPip installs a pip wheel from a url.