From fe08a529d3dbb86e942e1445fbb2a63544e4c943 Mon Sep 17 00:00:00 2001 From: Mike Place Date: Tue, 26 May 2020 15:15:34 +0200 Subject: [PATCH 1/6] Fix bdist/wheel errors on build --- dev-tools/mage/pytest.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dev-tools/mage/pytest.go b/dev-tools/mage/pytest.go index 539fc8b3f1b..f5fffa16f81 100644 --- a/dev-tools/mage/pytest.go +++ b/dev-tools/mage/pytest.go @@ -210,6 +210,13 @@ func PythonVirtualenv() (string, error) { args = append(args, "-Ur", req) } + // First ensure that wheel is installed so that + // bdists build cleanly + wheel_args := append(args, "-Ur", "wheel") + if err := sh.RunWith(env, pip, wheel_args...); err != nil { + return "", err + } + // Execute pip to install the dependencies. if err := sh.RunWith(env, pip, args...); err != nil { return "", err From a9185ced36088392f206ccfc31e5d570822f4685 Mon Sep 17 00:00:00 2001 From: Mike Place Date: Tue, 26 May 2020 15:29:48 +0200 Subject: [PATCH 2/6] Use independent args --- dev-tools/mage/pytest.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev-tools/mage/pytest.go b/dev-tools/mage/pytest.go index f5fffa16f81..3c6a4ee3165 100644 --- a/dev-tools/mage/pytest.go +++ b/dev-tools/mage/pytest.go @@ -212,7 +212,8 @@ func PythonVirtualenv() (string, error) { // First ensure that wheel is installed so that // bdists build cleanly - wheel_args := append(args, "-Ur", "wheel") + wheel_args := []string{"install"} + wheel_args = append(wheel_args, "-Ur", "wheel") if err := sh.RunWith(env, pip, wheel_args...); err != nil { return "", err } From afb4602306cc432dca38a537a56271c8618d1024 Mon Sep 17 00:00:00 2001 From: Mike Place Date: Tue, 26 May 2020 15:34:36 +0200 Subject: [PATCH 3/6] Formatting --- dev-tools/mage/pytest.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dev-tools/mage/pytest.go b/dev-tools/mage/pytest.go index 3c6a4ee3165..6a6ccac1428 100644 --- a/dev-tools/mage/pytest.go +++ b/dev-tools/mage/pytest.go @@ -210,11 +210,11 @@ func PythonVirtualenv() (string, error) { args = append(args, "-Ur", req) } - // First ensure that wheel is installed so that - // bdists build cleanly - wheel_args := []string{"install"} - wheel_args = append(wheel_args, "-Ur", "wheel") - if err := sh.RunWith(env, pip, wheel_args...); err != nil { + // First ensure that wheel is installed so that + // bdists build cleanly + wheelArgs := []string{"install"} + wheelArgs = append(wheelArgs, "-Ur", "wheel") + if err := sh.RunWith(env, pip, wheelArgs...); err != nil { return "", err } From 5c8c27b88376e39711dc6ec2c6c8f4b669672fd9 Mon Sep 17 00:00:00 2001 From: Mike Place Date: Tue, 26 May 2020 15:55:24 +0200 Subject: [PATCH 4/6] Remove -r --- dev-tools/mage/pytest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-tools/mage/pytest.go b/dev-tools/mage/pytest.go index 6a6ccac1428..3cf593cf2b9 100644 --- a/dev-tools/mage/pytest.go +++ b/dev-tools/mage/pytest.go @@ -213,7 +213,7 @@ func PythonVirtualenv() (string, error) { // First ensure that wheel is installed so that // bdists build cleanly wheelArgs := []string{"install"} - wheelArgs = append(wheelArgs, "-Ur", "wheel") + wheelArgs = append(wheelArgs, "-U", "wheel") if err := sh.RunWith(env, pip, wheelArgs...); err != nil { return "", err } From 8e260675c680686290bcce158ae176ad12dd60de Mon Sep 17 00:00:00 2001 From: Mike Place Date: Tue, 26 May 2020 16:26:23 +0200 Subject: [PATCH 5/6] Collapse into single line --- dev-tools/mage/pytest.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dev-tools/mage/pytest.go b/dev-tools/mage/pytest.go index 3cf593cf2b9..8e0c115a1fe 100644 --- a/dev-tools/mage/pytest.go +++ b/dev-tools/mage/pytest.go @@ -212,8 +212,7 @@ func PythonVirtualenv() (string, error) { // First ensure that wheel is installed so that // bdists build cleanly - wheelArgs := []string{"install"} - wheelArgs = append(wheelArgs, "-U", "wheel") + wheelArgs := []string{"install", "-U", "wheel"} if err := sh.RunWith(env, pip, wheelArgs...); err != nil { return "", err } From 3b2d5db9194cc0c7b36a174ab2b124041d98eedb Mon Sep 17 00:00:00 2001 From: cachedout Date: Fri, 5 Jun 2020 07:27:44 +0000 Subject: [PATCH 6/6] Update dev-tools/mage/pytest.go Co-authored-by: Andrew Kroh --- dev-tools/mage/pytest.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dev-tools/mage/pytest.go b/dev-tools/mage/pytest.go index 8e0c115a1fe..4cb330f7a5d 100644 --- a/dev-tools/mage/pytest.go +++ b/dev-tools/mage/pytest.go @@ -210,10 +210,8 @@ func PythonVirtualenv() (string, error) { args = append(args, "-Ur", req) } - // First ensure that wheel is installed so that - // bdists build cleanly - wheelArgs := []string{"install", "-U", "wheel"} - if err := sh.RunWith(env, pip, wheelArgs...); err != nil { + // First ensure that wheel is installed so that bdists build cleanly. + if err = sh.RunWith(env, pip, "install", "-U", "wheel"); err != nil { return "", err }