Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python on path #258

Merged
merged 9 commits into from
Oct 17, 2023
Prev Previous commit
Next Next commit
Log the python executable we are running
  • Loading branch information
mmarchetti committed Oct 16, 2023
commit 9cab7dd866959fef01b491d6bf88a5a1547f9de9
2 changes: 2 additions & 0 deletions internal/environment/python.go
Original file line number Diff line number Diff line change
@@ -83,6 +83,7 @@ func (i *defaultPythonInspector) GetPythonVersion() (string, error) {
if err != nil {
return "", err
}
i.log.Info("Running Python", "python", pythonExecutable)
args := []string{
`-E`, // ignore python-specific environment variables
`-c`, // execute the next argument as python code
@@ -111,6 +112,7 @@ func (i *defaultPythonInspector) GetPythonRequirements() ([]byte, error) {
if err != nil {
return nil, err
}
i.log.Info("Running Python", "python", pythonExecutable)
source := fmt.Sprintf("'%s -m pip freeze'", pythonExecutable)
i.log.Info("Using Python packages", "source", source)
args := []string{"-m", "pip", "freeze"}