You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2022/06/09 23:39:37 UTC

[arrow] branch master updated: ARROW-16694: [Packaging][Python] Use Mamba instead of conda to build conda environment for windows packaging jobs (#13351)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 8e64aa78ba ARROW-16694: [Packaging][Python] Use Mamba instead of conda to build conda environment for windows packaging jobs (#13351)
8e64aa78ba is described below

commit 8e64aa78ba73b414fc02fdab1ca3009b8e1a2116
Author: Raúl Cumplido <ra...@gmail.com>
AuthorDate: Fri Jun 10 01:39:30 2022 +0200

    ARROW-16694: [Packaging][Python] Use Mamba instead of conda to build conda environment for windows packaging jobs (#13351)
    
    Conda windows packaging jobs have been failing since the 26th of May.
    There was a problem when creating the conda environment using conda with the boa requirement having conflicts.
    This PR updates the Azure pipeline to use Mamba instead of conda to create the environment as the upstream feedstock does:
    https://github.com/conda-forge/arrow-cpp-feedstock/blob/main/.azure-pipelines/azure-pipelines-win.yml
    
    Authored-by: Raúl Cumplido <ra...@gmail.com>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 dev/tasks/conda-recipes/azure.win.yml | 29 ++++++++++++++++++++++-------
 1 file changed, 22 insertions(+), 7 deletions(-)

diff --git a/dev/tasks/conda-recipes/azure.win.yml b/dev/tasks/conda-recipes/azure.win.yml
index d25f4d77be..c8c534c473 100755
--- a/dev/tasks/conda-recipes/azure.win.yml
+++ b/dev/tasks/conda-recipes/azure.win.yml
@@ -35,12 +35,26 @@ jobs:
       condition: contains(variables['CONFIG'], 'vs2008')
       displayName: Patch vs2008 (if needed)
 
-    - task: CondaEnvironment@1
+    - task: PythonScript@0
+      displayName: 'Download Miniforge'
       inputs:
-        packageSpecs: 'python=3.9 conda-build conda "conda-forge-ci-setup=3" pip boa' # Optional
-        installOptions: "-c conda-forge"
-        updateConda: true
-      displayName: Install conda-build and activate environment
+        scriptSource: inline
+        script: |
+          import urllib.request
+          url = 'https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe'
+          path = r"$(Build.ArtifactStagingDirectory)/Miniforge.exe"
+          urllib.request.urlretrieve(url, path)
+
+    - script: |
+        start /wait "" %BUILD_ARTIFACTSTAGINGDIRECTORY%\Miniforge.exe /InstallationType=JustMe /RegisterPython=0 /S /D=C:\Miniforge
+      displayName: Install Miniforge
+    - powershell: Write-Host "##vso[task.prependpath]C:\Miniforge\Scripts"
+      displayName: Add conda to PATH
+
+    - script: |
+        call activate base
+        mamba.exe install 'python=3.9' conda-build conda pip boa 'conda-forge-ci-setup=3' -c conda-forge --strict-channel-priority --yes
+      displayName: Install conda-build
 
     - script: set PYTHONUNBUFFERED=1
       displayName: Set PYTHONUNBUFFERED
@@ -52,6 +66,7 @@ jobs:
         call activate base
         setup_conda_rc .\ .\ .\.ci_support\%CONFIG%.yaml
       workingDirectory: arrow\dev\tasks\conda-recipes
+      displayName: conda-forge CI setup
 
     # Configure the VM.
     - script: |
@@ -64,7 +79,7 @@ jobs:
     - script: |
         call activate base
         conda.exe mambabuild arrow-cpp parquet-cpp -m .ci_support\%CONFIG%.yaml
-      displayName: Build recipe
+      displayName: Build Arrow recipe
       workingDirectory: arrow\dev\tasks\conda-recipes
       env:
         PYTHONUNBUFFERED: 1
@@ -73,7 +88,7 @@ jobs:
     - script: |
         call activate base
         conda.exe mambabuild r-arrow -m .ci_support\r\%R_CONFIG%.yaml
-      displayName: Build recipe
+      displayName: Build R-Arrow recipe
       workingDirectory: arrow\dev\tasks\conda-recipes
       env:
         PYTHONUNBUFFERED: 1