<commit_before>.. _sec-compiling:

*************************
Cantera Compilation Guide
*************************

.. toctree::
   :hidden:

   SCons Configuration Options <configuring>

This guide contains instructions for compiling Cantera on the following
operating systems:

* Linux

  * Ubuntu 10.04 LTS (Lucid Lynx) or newer
  * Debian 5.0 (Lenny) or newer

* Windows Vista, Windows 7, or Windows 8 (32-bit or 64-bit versions)
* OS X 10.6 (Snow Leopard) or newer. OS X 10.9 (Mavericks) is recommended.

In addition to the above operating systems, Cantera should work on any
Unix-like system where the necessary prerequisites are available, but some
additional configuration may be required.

Installation Prerequisites
==========================

Linux
-----

* For Ubuntu or Debian users, the following packages should be installed using
  your choice of package manager::

      g++ python scons libboost-all-dev libsundials-serial-dev subversion

* Building the python module also requires::

      cython python-dev python-numpy python-numpy-dev

* The minimum compatible Cython version is 0.17. If your distribution does not
  contain a suitable version, you may be able to install a more recent version
  using `easy_install` or `pip`.

* Building the Fortran interface also requires gfortran or another supported
  Fortran compiler.
* Users of other distributions should install the equivalent packages, which
  may have slightly different names.

Windows
-------

There are a number of requirements for the versions of software to install
depending on which interfaces (Python, Matlab) you want to build and what
architecture (32-bit or 64-bit) you want to use. See :ref:`sec-dependencies` for
the full list of dependencies.

* If you want to build the Python module, you must use the same version of the
  Microsoft compiler as was used to compile Python. For Python 2.6 and Python
  2.7, this means that you must use Visual Studio 2008 or the equivalent version
  of the Windows SDK (see link below). For Python 3.3, you should use Visual
  Studio 2010, or the corresponding version of the Windows SDK. You can use
  MinGW to sidestep this requirement.
* Note that the the "Express" editions of Visual Studio 2008 do not include a
  64-bit compiler, so if you want to build 64-bit Cantera, you will also need to
  install the Windows SDK.
* The build process will produce a Python module compatible with the version of
  Python used for the compilation. To generate different modules for other
  versions of Python, you will need to install those versions of Python and
  recompile.
* If you want to build the Matlab toolbox and you have a 64-bit copy of
  Windows, by default you will be using a 64-bit copy of Matlab, and therefore
  you need to compile Cantera in 64-bit mode. For simplicity, it is highly
  recommended that you use a 64-bit version of Python to handle this
  automatically.
* There is no 64-bit installer for SCons under Windows, so you will need to
  download the ZIP version. After extracting it, start a command prompt in the
  unzipped folder and run::

     python setup.py install

* It is generally helpful to have SCons and Python in your PATH. This can
  usually be accomplished by adding the top-level Python directory
  (e.g. ``C:\Python27``) to your PATH. This is accessible from::

      Control Panel > System and Security > System > Advanced System Settings > Environment Variables

OS X
----

* Download and install Xcode from the
  `Apple Developer site <https://developer.apple.com/xcode/index.php>`_
* Cantera can be compiled with the command line tools that ship with either
  Xcode 3.x, Xcode 4.x, or Xcode 5.x. Xcode 5.x is recommended.
* If you don't have numpy version >= 1.3, you can install a recent version with::

    sudo easy_install -U numpy

* If you want to build Cantera with Fortran 90 support, download gfortran from::

    http://gcc.gnu.org/wiki/GFortranBinaries#MacOS

* Download scons-2.x.y.tar.gz from scons.org and extract the contents. Install with either::

      sudo python setup.py install

  to install for all users, or::

     python setup.py install --user

  to install to a location in your home directory.

Downloading the Cantera source code
===================================

Stable Release
--------------

* Option 1: Download the most recent source tarball from `SourceForge
  <https://sourceforge.net/projects/cantera/files/cantera/>`_ and extract the
  contents.

* Option 2: Check out the code using Subversion::

    svn checkout http://cantera.googlecode.com/svn/cantera/branches/2.0/ cantera

* Option 3: Check out the code using Git::

    git svn clone --stdlayout http://cantera.googlecode.com/svn/cantera cantera
    git checkout 2.0

Development Version<commit_msg>[Doc] Update version specified in git/svn checkout commands<commit_after>.. _sec-compiling:

*************************
Cantera Compilation Guide
*************************

.. toctree::
   :hidden:

   SCons Configuration Options <configuring>

This guide contains instructions for compiling Cantera on the following
operating systems:

* Linux

  * Ubuntu 10.04 LTS (Lucid Lynx) or newer
  * Debian 5.0 (Lenny) or newer

* Windows Vista, Windows 7, or Windows 8 (32-bit or 64-bit versions)
* OS X 10.6 (Snow Leopard) or newer. OS X 10.9 (Mavericks) is recommended.

In addition to the above operating systems, Cantera should work on any
Unix-like system where the necessary prerequisites are available, but some
additional configuration may be required.

Installation Prerequisites
==========================

Linux
-----

* For Ubuntu or Debian users, the following packages should be installed using
  your choice of package manager::

      g++ python scons libboost-all-dev libsundials-serial-dev subversion

* Building the python module also requires::

      cython python-dev python-numpy python-numpy-dev

* The minimum compatible Cython version is 0.17. If your distribution does not
  contain a suitable version, you may be able to install a more recent version
  using `easy_install` or `pip`.

* Building the Fortran interface also requires gfortran or another supported
  Fortran compiler.
* Users of other distributions should install the equivalent packages, which
  may have slightly different names.

Windows
-------

There are a number of requirements for the versions of software to install
depending on which interfaces (Python, Matlab) you want to build and what
architecture (32-bit or 64-bit) you want to use. See :ref:`sec-dependencies` for
the full list of dependencies.

* If you want to build the Python module, you must use the same version of the
  Microsoft compiler as was used to compile Python. For Python 2.6 and Python
  2.7, this means that you must use Visual Studio 2008 or the equivalent version
  of the Windows SDK (see link below). For Python 3.3, you should use Visual
  Studio 2010, or the corresponding version of the Windows SDK. You can use
  MinGW to sidestep this requirement.
* Note that the the "Express" editions of Visual Studio 2008 do not include a
  64-bit compiler, so if you want to build 64-bit Cantera, you will also need to
  install the Windows SDK.
* The build process will produce a Python module compatible with the version of
  Python used for the compilation. To generate different modules for other
  versions of Python, you will need to install those versions of Python and
  recompile.
* If you want to build the Matlab toolbox and you have a 64-bit copy of
  Windows, by default you will be using a 64-bit copy of Matlab, and therefore
  you need to compile Cantera in 64-bit mode. For simplicity, it is highly
  recommended that you use a 64-bit version of Python to handle this
  automatically.
* There is no 64-bit installer for SCons under Windows, so you will need to
  download the ZIP version. After extracting it, start a command prompt in the
  unzipped folder and run::

     python setup.py install

* It is generally helpful to have SCons and Python in your PATH. This can
  usually be accomplished by adding the top-level Python directory
  (e.g. ``C:\Python27``) to your PATH. This is accessible from::

      Control Panel > System and Security > System > Advanced System Settings > Environment Variables

OS X
----

* Download and install Xcode from the
  `Apple Developer site <https://developer.apple.com/xcode/index.php>`_
* Cantera can be compiled with the command line tools that ship with either
  Xcode 3.x, Xcode 4.x, or Xcode 5.x. Xcode 5.x is recommended.
* If you don't have numpy version >= 1.3, you can install a recent version with::

    sudo easy_install -U numpy

* If you want to build Cantera with Fortran 90 support, download gfortran from::

    http://gcc.gnu.org/wiki/GFortranBinaries#MacOS

* Download scons-2.x.y.tar.gz from scons.org and extract the contents. Install with either::

      sudo python setup.py install

  to install for all users, or::

     python setup.py install --user

  to install to a location in your home directory.

Downloading the Cantera source code
===================================

Stable Release
--------------

* Option 1: Download the most recent source tarball from `SourceForge
  <https://sourceforge.net/projects/cantera/files/cantera/>`_ and extract the
  contents.

* Option 2: Check out the code using Subversion::

    svn checkout http://cantera.googlecode.com/svn/cantera/branches/2.1/ cantera

* Option 3: Check out the code using Git::

    git svn clone --stdlayout http://cantera.googlecode.com/svn/cantera cantera
    git checkout 2.1

Development Version
{'fraction_non_alphanumeric': 0.08394160583941605, 'fraction_numerical': 0.01564129301355579, 'mean_word_length': 3.75037147102526, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4704985', 'n_tokens_mistral': 2740, 'n_tokens_neox': 2497, 'n_words': 1316}