Skip to content

Commit 99e04c5

Browse files
committed
Move Conda env to PowerShell recipe script
PY_VER removes the `.` it is used on appveyor_build_recipe.ps1
1 parent da940f5 commit 99e04c5

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

appveyor.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ environment:
99
global:
1010
PYTHONUNBUFFERED: True
1111
PYTHONWARNINGS: 'ignore:::wheel.pep425tags:'
12-
CONDA_BLD: C:\miniconda35
1312

1413
matrix:
1514
- PYTHON_VERSION: 2.7
@@ -22,15 +21,12 @@ init:
2221
# Prepare Environment
2322
- mkdir C:\testdir
2423

25-
# Set environment variables depending based on build cfg
26-
- set CONDA_PY=%PYTHON_VERSION:.=%
27-
- set CONDA_BLD_ARCH=%PLATFORM:x=%
28-
- set PYTHON=C:\PYTHON%PYTHON_VERSION:.=%
29-
- if %PLATFORM%==x86 (set CONDA_BLD_ARCH=32)
24+
# Update Environment Variables based on matrix/platform
25+
- set PY_VER=%PYTHON_VERSION:.=%
26+
- set PYTHON=C:\PYTHON%PY_VER%
3027
- if %PLATFORM%==x64 (set PYTHON=%PYTHON%-x64)
31-
- if %PLATFORM%==x64 (set CONDA_BLD=%CONDA_BLD%-x64)
3228

33-
# Prepend newly installed Python to the PATH of this build
29+
# Put desired Python version first in PATH
3430
- set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
3531

3632
install:

ci/appveyor_build_recipe.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Build `conda.recipe` only if this is a Pull_Request. Saves time for CI.
22

3+
$env:CONDA_PY = "$env:PY_VER"
4+
# Use pre-installed miniconda. Note that location differs if 64bit
5+
$env:CONDA_BLD = "C:\miniconda35"
6+
7+
if ($env:PLATFORM -eq "x86"){
8+
$env:CONDA_BLD_ARCH=32
9+
} else {
10+
$env:CONDA_BLD_ARCH=64
11+
$env:CONDA_BLD = "$env:CONDA_BLD" + "-x64"
12+
}
13+
314
if ($env:APPVEYOR_PULL_REQUEST_NUMBER) {
415
# Update PATH, and keep a copy to restore at end of this PowerShell script
516
$old_path = $env:path

0 commit comments

Comments
 (0)