mirror of https://github.com/databricks/cli.git
Correctly mark package names with versions as remote libraries (#1697)
## Changes Fixes https://github.com/databricks/setup-cli/issues/124 ## Tests Added regression test
This commit is contained in:
parent
242d4b51ed
commit
6771ba09a6
|
@ -66,6 +66,11 @@ func IsLibraryLocal(dep string) bool {
|
|||
}
|
||||
|
||||
func isPackage(name string) bool {
|
||||
// If the dependency has ==, it's a package with version
|
||||
if strings.Contains(name, "==") {
|
||||
return true
|
||||
}
|
||||
|
||||
// If the dependency has no extension, it's a PyPi package name
|
||||
return path.Ext(name) == ""
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ func TestIsLibraryLocal(t *testing.T) {
|
|||
{path: "-r /Workspace/my_project/requirements.txt", expected: false},
|
||||
{path: "s3://mybucket/path/to/package", expected: false},
|
||||
{path: "dbfs:/mnt/path/to/package", expected: false},
|
||||
{path: "beautifulsoup4==4.12.3", expected: false},
|
||||
}
|
||||
|
||||
for i, tc := range testCases {
|
||||
|
|
Loading…
Reference in New Issue