lazylynx commented on a change in pull request #12115:
URL: https://github.com/apache/beam/pull/12115#discussion_r449126596



##########
File path: sdks/python/container/boot.go
##########
@@ -170,6 +176,28 @@ func main() {
        log.Fatalf("Python exited: %v", execx.Execute("python", args...))
 }
 
+// setup wheel specs according to installed python version
+func setupAcceptableWheelSpecs() error {
+       cmd := exec.Command("python", "-V")
+       stdoutStderr, err := cmd.CombinedOutput()
+       if err != nil {
+               return err
+       }
+       re := regexp.MustCompile(`Python (\d)\.(\d).*`)
+       pyVersions := re.FindStringSubmatch(string(stdoutStderr[:]))
+       if len(pyVersions) != 3 {
+               return fmt.Errorf("cannot get python version with expected 
format")

Review comment:
       It would be better!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to