internal/rosa/python: extra script after install
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m49s
Test / Hakurei (push) Successful in 3m47s
Test / ShareFS (push) Successful in 3m52s
Test / Sandbox (race detector) (push) Successful in 5m20s
Test / Hakurei (race detector) (push) Successful in 6m24s
Test / Flake checks (push) Successful in 1m21s
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m49s
Test / Hakurei (push) Successful in 3m47s
Test / ShareFS (push) Successful in 3m52s
Test / Sandbox (race detector) (push) Successful in 5m20s
Test / Hakurei (race detector) (push) Successful in 6m24s
Test / Flake checks (push) Successful in 1m21s
This is generally for test suite, due to the lack of standard or widely agreed upon convention. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user