Skip to content

Commit 0a55acd

Browse files
authored
Use default python in the base image (#1589)
* use default python in the base image Signed-off-by: Kevin Su <pingsutw@apache.org> * nit Signed-off-by: Kevin Su <pingsutw@apache.org> * lint fix Signed-off-by: Kevin Su <pingsutw@apache.org> * nit Signed-off-by: Kevin Su <pingsutw@apache.org> --------- Signed-off-by: Kevin Su <pingsutw@apache.org>
1 parent 7089bda commit 0a55acd

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

pkg/lang/ir/v1/system.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -256,16 +256,17 @@ func (g *generalGraph) compileLanguage(root llb.State) (llb.State, error) {
256256

257257
func (g *generalGraph) compileLanguagePackages(root llb.State) llb.State {
258258
packs := []llb.State{}
259-
pack := root
259+
260+
// Use default python in the base image if install.python() is not specified.
261+
index := g.compilePyPIIndex(root)
262+
pack := g.compilePyPIPackages(index)
263+
if g.CondaConfig != nil {
264+
channel := g.compileCondaChannel(pack)
265+
pack = g.compileCondaPackages(channel)
266+
}
267+
260268
for _, language := range g.Languages {
261269
switch language.Name {
262-
case "python":
263-
index := g.compilePyPIIndex(root)
264-
pack = g.compilePyPIPackages(index)
265-
if g.CondaConfig != nil {
266-
channel := g.compileCondaChannel(pack)
267-
pack = g.compileCondaPackages(channel)
268-
}
269270
case "r":
270271
pack = g.installRPackages(root)
271272
case "julia":

0 commit comments

Comments
 (0)