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



##########
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 parse Python version from %s", 
stdoutStderr)
+       }
+       pyVersion := fmt.Sprintf("%s%s", pyVersions[1], pyVersions[2])
+       if pyVersion == "27" {
+               acceptableWhlSpecs = append(acceptableWhlSpecs, 
"cp27-cp27mu-manylinux1_x86_64.whl")
+       } else {
+               wheelName := fmt.Sprintf("cp%s-cp%sm-manylinux1_x86_64.whl", 
pyVersion, pyVersion)

Review comment:
       Thank you for notification.
   I found that wheel changed naming rule at 0.33.5.
   > 0.33.5 (2019-08-17)
   > Don’t add the m ABI flag to wheel names on Python 3.8 (PR by rdb)
   https://wheel.readthedocs.io/en/stable/news.html
   
   I'll push a fix tonight, wait a bit.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to