Skip to content

Commit

Permalink
First try at Appveyor MSI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Mar 10, 2018
0 parents commit 43063fa
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*~
19 changes: 19 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 1.0.{build}

install:
- cmd: set PATH=%PYTHON_LOC%;%PYTHON_LOC%\Scripts;%PATH%
- cmd: pip install --egg scons
- cmd: pip install numpy cython

build_script:
- cmd: set PATH=%PYTHON_LOC%;%PYTHON_LOC%\Scripts;%PATH%
- cmd: call build.bat

environment:
matrix:
- PYTHON_LOC: C:\Python27
PY_VER: 2.7
- PYTHON_LOC: C:\Python36
PY_VER: 3.6
- PYTHON_LOC: C:\Python36-x64
PY_VER: 3.6
39 changes: 39 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
@ECHO off

IF %ARCH% EQU 64 (
CALL "%VS140COMNTOOLS%"\..\..\VC\bin\amd64\vcvars64.bat
) ELSE (
CALL "%VS140COMNTOOLS%"\..\..\VC\bin\vcvars32.bat
)

:: The major version of Python being used
SET PY_MAJ_VER=%PY_VER:~0,1%

IF %PY_MAJ_VER% EQU 2 (
CALL pip install 3to2
)

:: Set the number of CPUs to use in building
SET /A CPU_USE=%CPU_COUNT% / 2
IF %CPU_USE% EQU 0 SET CPU_USE=1

git clone https://github.com/Cantera/cantera.git
cd cantera
git checkout %CANTERA_TAG%

:: Have to use CALL to prevent the script from exiting after calling SCons
CALL scons clean

:: Put important settings into cantera.conf for the build. Use VS 2015 to
:: compile the interface.
ECHO msvc_version='14.0' >> cantera.conf
ECHO matlab_toolbox='n' >> cantera.conf
ECHO debug='n' >> cantera.conf
ECHO f90_interface='n' >> cantera.conf
ECHO system_sundials='n' >> cantera.conf

SET "ESC_PREFIX=%PREFIX:\=/%"
ECHO boost_inc_dir="%ESC_PREFIX%/Library/include" >> cantera.conf

CALL scons build -j%CPU_USE% python_package=y python_cmd="%PYTHON%"
CALL scons msi

0 comments on commit 43063fa

Please sign in to comment.