This is an automated email from the ASF dual-hosted git repository.

yhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 6dfe06adbbf Always install dev wheel if passed to sdk_version (#26913)
6dfe06adbbf is described below

commit 6dfe06adbbfa60f2e90804e4400911c127da48cc
Author: Yi Hu <[email protected]>
AuthorDate: Fri May 26 18:44:33 2023 -0400

    Always install dev wheel if passed to sdk_version (#26913)
---
 sdks/python/container/piputil.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sdks/python/container/piputil.go b/sdks/python/container/piputil.go
index a931f45a672..03ac8325d6d 100644
--- a/sdks/python/container/piputil.go
+++ b/sdks/python/container/piputil.go
@@ -148,8 +148,11 @@ func findBeamSdkWhl(files []string, acceptableWhlSpecs 
[]string) string {
 // SDK from source tarball provided in sdkSrcFile.
 func installSdk(files []string, workDir string, sdkSrcFile string, 
acceptableWhlSpecs []string, required bool) error {
        sdkWhlFile := findBeamSdkWhl(files, acceptableWhlSpecs)
+
        if sdkWhlFile != "" {
-               err := pipInstallPackage(files, workDir, sdkWhlFile, false, 
false, []string{"gcp"})
+               // by default, pip rejects to install wheel if same version 
already installed
+               isDev := strings.Contains(sdkWhlFile, ".dev")
+               err := pipInstallPackage(files, workDir, sdkWhlFile, isDev, 
false, []string{"gcp"})
                if err == nil {
                        return nil
                }

Reply via email to