Skip to content

Commit 65fbbd9

Browse files
authored
libs/python: Remove DetectInterpreters (#2234)
## Changes - Remove DetectInterpreters from DetectExecutable call: python3 or python should always be on on the PATH. We don't need to detect non-standard situations like python3.10 is present but python3 is not. - I moved DetectInterpreters to cmd/labs where it is still used. This is a follow up to #2034 ## Tests Existing tests.
1 parent 4595c6f commit 65fbbd9

File tree

20 files changed

+8
-37
lines changed

20 files changed

+8
-37
lines changed

cmd/labs/project/installer.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
"github.com/databricks/cli/libs/databrickscfg/profile"
1616
"github.com/databricks/cli/libs/log"
1717
"github.com/databricks/cli/libs/process"
18-
"github.com/databricks/cli/libs/python"
1918
"github.com/databricks/databricks-sdk-go"
2019
"github.com/databricks/databricks-sdk-go/service/compute"
2120
"github.com/databricks/databricks-sdk-go/service/sql"
@@ -223,7 +222,7 @@ func (i *installer) setupPythonVirtualEnvironment(ctx context.Context, w *databr
223222
feedback := cmdio.Spinner(ctx)
224223
defer close(feedback)
225224
feedback <- "Detecting all installed Python interpreters on the system"
226-
pythonInterpreters, err := python.DetectInterpreters(ctx)
225+
pythonInterpreters, err := DetectInterpreters(ctx)
227226
if err != nil {
228227
return fmt.Errorf("detect: %w", err)
229228
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package python
1+
package project
22

33
import (
44
"context"

libs/python/interpreters_unix_test.go renamed to cmd/labs/project/interpreters_unix_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//go:build unix
22

3-
package python
3+
package project
44

55
import (
66
"context"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//go:build windows
22

3-
package python
3+
package project
44

55
import (
66
"context"

libs/python/testdata/other-binaries-filtered/python renamed to cmd/labs/project/testdata/other-binaries-filtered/python

File renamed without changes.

libs/python/testdata/other-binaries-filtered/python3-whatever renamed to cmd/labs/project/testdata/other-binaries-filtered/python3-whatever

File renamed without changes.

libs/python/testdata/other-binaries-filtered/python3.10 renamed to cmd/labs/project/testdata/other-binaries-filtered/python3.10

File renamed without changes.

libs/python/testdata/other-binaries-filtered/python3.10.100 renamed to cmd/labs/project/testdata/other-binaries-filtered/python3.10.100

File renamed without changes.

libs/python/testdata/other-binaries-filtered/python3.11 renamed to cmd/labs/project/testdata/other-binaries-filtered/python3.11

File renamed without changes.

libs/python/testdata/other-binaries-filtered/python4.8 renamed to cmd/labs/project/testdata/other-binaries-filtered/python4.8

File renamed without changes.

0 commit comments

Comments
 (0)