From 1e5eba4819f50f69be75701f999ab6cde1ad6595 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 2 Sep 2014 22:34:13 +0000 Subject: [PATCH] [Doc] Add OS X installation instructions using Homebrew --- doc/sphinx/faq.rst | 5 +++ doc/sphinx/install.rst | 72 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/doc/sphinx/faq.rst b/doc/sphinx/faq.rst index c419c1627..e61a1b168 100644 --- a/doc/sphinx/faq.rst +++ b/doc/sphinx/faq.rst @@ -19,6 +19,11 @@ Installation & Compilation `_ and follow the instructions in the :ref:`sec-compiling`. +**How do I install Cantera on Mac OS X?** + + Cantera can be installed using Homebrew. See :ref:`Mac OS X Installation + ` for details. + **What do I do if compiling Cantera fails?** - Examine the output of the ``scons build`` command, especially anything diff --git a/doc/sphinx/install.rst b/doc/sphinx/install.rst index 59b07b3d1..0d236f7bc 100644 --- a/doc/sphinx/install.rst +++ b/doc/sphinx/install.rst @@ -4,6 +4,10 @@ Installing Cantera ****************** +.. contents:: + :local: + :depth: 1 + .. _sec-install-win: Windows @@ -120,3 +124,71 @@ installation instructions are for Cantera 2.1.1. gas = IdealGasMix('gri30.cti') h2o = importPhase('liquidvapor.cti','water') + +.. _sec-install-osx: + +Mac OS X +======== + +The easiest way to install Cantera on OS X is by using Homebrew. These +instructions have been tested on Mac OS X 10.9 (Mavericks) with Xcode 5.1. + +Prerequisites +------------- + +If you've used Homebrew before, you may have already completed some of these +steps and can skip them. + +- Install Xcode from the App store + +- From a Terminal, run:: + + sudo xcodebuild + + and agree to the Xcode license agreement + +- Install `Homebrew `_ + +- Run the following commands: + + brew tap homebrew/science + brew update + brew install python scons sundials + +- Put ``/usr/local/bin`` at the front of your path, e.g. add the following to + ``~/.bash_profile`` (creating this file if it doesn't already exist):: + + export PATH=/usr/local/bin:$PATH + +- Run:: + + source ~/.bash_profile + +- If you want to build the Cantera Python 2 module, run:: + + pip install cython numpy + +- If you want to build the Cantera Python 3 module, run:: + + brew install python3 + pip3 install numpy cython + +Installing Cantera +------------------ + +The installation command for Cantera supports several options: + +- To install Cantera with additional patches that will be included in the next + maintenance release, use the flag: ``--devel`` + +- To Install the current development version of Cantera, use the flag: + ``--HEAD`` + +- To install the Matlab toolbox, use the flag + ``--with-matlab=/Applications/MATLAB_R2014a.app/`` (with the version modified + to match your installed Matlab version) + +Install Cantera by adding the desired options to the ``brew install`` command, +e.g.:: + + brew install cantera --devel --with-matlab=/Applications/MATLAB_R2014a.app/