Skip to content

Commit 47e8764

Browse files
committed
add module install check
1 parent a2e912d commit 47e8764

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

appveyor.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ environment:
33
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
44
# /E:ON and /V:ON options are not enabled in the batch script intepreter
55
# See: http://stackoverflow.com/a/13751649/163740
6-
PYTHON: "C:\\conda"
76
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
8-
MINICONDA_FILENAME: "Miniconda2-latest-Windows-x86_64.exe"
97

108
matrix:
11-
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
12-
PYTHON_VERSION: "3.5"
9+
- PYTHON: "C:\\conda"
10+
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
11+
MINICONDA_FILENAME: "Miniconda2-latest-Windows-x86_64.exe"
1312

1413
init:
1514
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
@@ -27,11 +26,17 @@ install:
2726
- ECHO "Filesystem root:"
2827
- ps: "ls \"C:/\""
2928

29+
- ECHO "Installed SDKs:"
30+
- ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
31+
32+
# Install Python (from the official .msi of https://python.org) and pip when
33+
# not already installed.
34+
- ps: if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 }
3035

3136
# Prepend newly installed Python to the PATH of this build (this cannot be
3237
# done from inside the powershell script as it would require to restart
3338
# the parent CMD process).
34-
#- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
39+
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
3540

3641
# Check that we have the expected version and architecture for Python
3742
- "python --version"
@@ -45,12 +50,10 @@ install:
4550
# compiled extensions and are not provided as pre-built wheel packages,
4651
# pip will build them from source using the MSVC compiler matching the
4752
# target Python version and architecture
48-
- "conda install numpy"
49-
- "conda install pandas"
50-
- "conda install scipy"
51-
- "conda install matplotlib"
52-
- "conda install -c conda-forge lapack"
53-
- "conda install -c cvxgrp cvxpy"
53+
- "%PYTHON%/Scripts/pip.exe install numpy"
54+
- "%PYTHON%/Scripts/pip.exe install pandas"
55+
- "%PYTHON%/Scripts/pip.exe install scipy"
56+
- "%PYTHON%/Scripts/pip.exe install matplotlib"
5457

5558
build: off
5659

tests/test_model_predictive_speed_and_steer_control.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
from unittest import TestCase
22

33
import sys
4+
if 'cvxpy' not in sys.modules:
5+
return
6+
47
sys.path.append("./PathTracking/model_predictive_speed_and_steer_control/")
58

69
from PathTracking.model_predictive_speed_and_steer_control import model_predictive_speed_and_steer_control as m

0 commit comments

Comments
 (0)