BLD: Replaced batch script for building dependency packages

with powershell.  Easier to write.

Check $LastExitCode when running non-powershell
This commit is contained in:
Richard Frank
2016-03-14 14:11:15 -04:00
parent dab85a8152
commit bf3307e768
+11 -13
View File
@@ -106,19 +106,17 @@ install:
# https://blog.ionelmc.ro/2014/12/21/compiling-python-extensions-on-windows/ for 64bit C compilation
- ps: copy .\ci\appveyor\vcvars64.bat "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64"
- cmd: |
FOR /D %%r IN (conda/*) DO (
IF NOT "%%r" == "zipline" (
%CMD_IN_ENV% conda build "conda/%%r" --python=%CONDA_PY% --numpy=%CONDA_NPY% --skip-existing -c quantopian
FOR /f "tokens=* USEBACKQ" %%F IN (`%CMD_IN_ENV% conda build "conda/%%r" --python=%CONDA_PY% --numpy=%CONDA_NPY% --output`) DO (
SET RECIPE_OUTPUT=%%F
)
IF EXIST "%RECIPE_OUTPUT%" (
%CMD_IN_ENV% anaconda -t %ANACONDA_TOKEN% upload "%RECIPE_OUTPUT%" -u quantopian --label ci
)
)
)
- ps: >-
foreach ($recipe in dir .\conda -dir -name) { `
if ($recipe -eq "zipline") { continue } `
iex "$env:CMD_IN_ENV conda build conda/$recipe -q --python=$env:CONDA_PY --numpy=$env:CONDA_NPY --skip-existing -c quantopian"; `
if ($LastExitCode -ne 0) { throw "Command failed with exit code $LastExitCode." } `
$RECIPE_OUTPUT=conda build conda/$recipe --python=$env:CONDA_PY --numpy=$env:CONDA_NPY --output; `
if (Test-Path $RECIPE_OUTPUT) { `
anaconda -t $env:ANACONDA_TOKEN upload "$RECIPE_OUTPUT" -u quantopian --label ci; `
if ($LastExitCode -ne 0) { throw "Command failed with exit code $LastExitCode." } `
} `
}
- cmd: '%CMD_IN_ENV% conda build conda/zipline --python=%CONDA_PY% --numpy=%CONDA_NPY% -c quantopian'
- cmd: conda create -n testenv --yes --use-local pip python=%PYTHON_VERSION% numpy=%NUMPY_VERSION% scipy=%SCIPY_VERSION% ta-lib=0.4.9 bcolz=0.12.1 numexpr=2.4.6