From 26e8083e90067af9f6e764a0f81d41d383f18dd2 Mon Sep 17 00:00:00 2001 From: Emily McMullan Date: Fri, 13 Dec 2024 15:39:05 -0500 Subject: [PATCH] remove python dep Signed-off-by: Emily McMullan --- cmd/analyze-bin.go | 26 +------------------------- go.mod | 4 ++-- go.sum | 8 ++++---- 3 files changed, 7 insertions(+), 31 deletions(-) diff --git a/cmd/analyze-bin.go b/cmd/analyze-bin.go index 468b5a5..2278a4c 100644 --- a/cmd/analyze-bin.go +++ b/cmd/analyze-bin.go @@ -226,31 +226,7 @@ func (a *analyzeCommand) RunAnalysisContainerless(ctx context.Context) error { } func (a *analyzeCommand) ValidateContainerless(ctx context.Context) error { - // validate mvn, python, and openjdk install - // windows does not use python3 as executable name - if runtime.GOOS == "windows" { - cmd := exec.Command("python", "--version") - output, err := cmd.Output() - if err != nil { - return fmt.Errorf("%w cannot execute required command python; ensure python is installed", err) - } - version := strings.TrimSpace(string(output)) - pythonVersionStr := strings.Split(version, " ") - versionStr := strings.Split(pythonVersionStr[1], ".") - versionInt, err := strconv.Atoi(versionStr[0]) - if err != nil { - return fmt.Errorf("%w cannot parse python version", err) - } - if versionInt < 3 { - return fmt.Errorf("%w cannot find requirement python3; ensure python3 is installed", err) - } - } else { - _, pythonErr := exec.LookPath("python3") - if pythonErr != nil { - return fmt.Errorf("%w cannot find requirement python3; ensure python3 is installed", pythonErr) - - } - } + // validate mvn and openjdk install _, mvnErr := exec.LookPath("mvn") if mvnErr != nil { return fmt.Errorf("%w cannot find requirement maven; ensure maven is installed", mvnErr) diff --git a/go.mod b/go.mod index 61c57e0..1283ff7 100644 --- a/go.mod +++ b/go.mod @@ -71,8 +71,8 @@ require ( github.com/codingconcepts/env v0.0.0-20200821220118-a8fbf8d84482 github.com/fabianvf/windup-rulesets-yaml v0.5.3 github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/konveyor/analyzer-lsp v0.6.0-beta.1.0.20241203211117-7b4c586939e8 - github.com/konveyor/analyzer-lsp/external-providers/java-external-provider v0.0.0-20241203211117-7b4c586939e8 + github.com/konveyor/analyzer-lsp v0.6.0-beta.1.0.20241213191020-b49d6a41aa43 + github.com/konveyor/analyzer-lsp/external-providers/java-external-provider v0.0.0-20241213191020-b49d6a41aa43 github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 github.com/spf13/pflag v1.0.5 // indirect diff --git a/go.sum b/go.sum index 490e606..46fac38 100644 --- a/go.sum +++ b/go.sum @@ -82,10 +82,10 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konveyor/analyzer-lsp v0.6.0-beta.1.0.20241203211117-7b4c586939e8 h1:xaOKsJ4AB17LnnsvNthrpScyaf73FMBPqoApOyQd5/k= -github.com/konveyor/analyzer-lsp v0.6.0-beta.1.0.20241203211117-7b4c586939e8/go.mod h1:l9XC3uazLba8yXoAFJWN7uBDju1s/g1Hc8TKBpE3B2U= -github.com/konveyor/analyzer-lsp/external-providers/java-external-provider v0.0.0-20241203211117-7b4c586939e8 h1:6GIfLM6Xh4EoFwHmgnBz8w0NlwZKBlVKyPrytp6p1GI= -github.com/konveyor/analyzer-lsp/external-providers/java-external-provider v0.0.0-20241203211117-7b4c586939e8/go.mod h1:0OaNuH9HgJZbXPKmblcAfJ+4qyuS5Rc0dp3kmMvjtKk= +github.com/konveyor/analyzer-lsp v0.6.0-beta.1.0.20241213191020-b49d6a41aa43 h1:xQq6hqT2jkz/y+nDGTTltQ6ckz65UZfk7WPkBrgjA0o= +github.com/konveyor/analyzer-lsp v0.6.0-beta.1.0.20241213191020-b49d6a41aa43/go.mod h1:l9XC3uazLba8yXoAFJWN7uBDju1s/g1Hc8TKBpE3B2U= +github.com/konveyor/analyzer-lsp/external-providers/java-external-provider v0.0.0-20241213191020-b49d6a41aa43 h1:BlUtDOY6tXwTsNpEvVsEE09WPirTX6xtE7Br/EVVJjc= +github.com/konveyor/analyzer-lsp/external-providers/java-external-provider v0.0.0-20241213191020-b49d6a41aa43/go.mod h1:9hR5THTSExZSAPz8uDEVgm2gm47F8gqFj8cU9K/d32M= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=