Update docs for python and general wrappers.

Closes https://github.com/CoolProp/CoolProp/issues/211
Closes https://github.com/CoolProp/CoolProp/issues/183

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-11-16 18:54:38 -05:00
parent 165a662c0f
commit b577b4f929
3 changed files with 25 additions and 48 deletions

View File

@@ -7,8 +7,8 @@ Labview Wrapper
.. contents:: :depth: 2
Pre-compiled Binaries
=====================
Pre-compiled Binaries for windows
=================================
Shared library
--------------
@@ -29,6 +29,7 @@ User-Compiled Binaries for windows
==================================
User-Compiled Binaries for VxWorks (cRIO)
=========================================

View File

@@ -18,31 +18,11 @@ Or the official release can be obtained from the pypi server using::
Manual installation
===================
Special MacOS X requirement
---------------------------
Compilation of the python wrapper requires a few :ref:`common wrapper pre-requisites <wrapper_common_prereqs>`
If you never used any command-line installation before, chances are that you
do not have the compiling utilities needed. Thus you need to first install
Xcode: see the description on the page http://guide.macports.org/#installing.xcode
After installing, you need to accept the licence by running the following
command in the Terminal::
On all platforms, if it is not already there, you need Cython to be installed::
xcodebuild -license
and explicitly typing "agree" before closing. Then you can resume to the
former method.
Windows
-------
To be explained...
Linux and MacOS X
-----------------
If not already there, you need Cython to be installed::
sudo easy_install Cython
sudo pip install Cython
Then, follow the commands::
@@ -88,20 +68,6 @@ by following the same lines as above::
# your effective installation)
sudo ~/Desktop/pyzo2014a/bin/python setup.py install
For VS2010:
-----------
http://stackoverflow.com/questions/8044385/64-bit-build-on-microsoft-visual-c-express-2010/8334985#8334985
For VS2008
----------
For MinGW
---------
Create a file called
Usage
=====

View File

@@ -41,10 +41,11 @@ On all platforms for which CoolProp is supported, the compilation of one of the
* git (to interface with the CoolProp repository at https://github.com/CoolProp/CoolProp)
* CMake (platform-independent software to generate makefiles)
* C++ compiler (see below)
* 7-zip
Windows
-------
On Windows, download the newest binary installer for CMake from `CMake downloads <http://www.cmake.org/cmake/resources/software.html>`_. Run the installer. Check that at the command prompt you can do::
On Windows, download the newest binary installer for CMake from `CMake downloads <http://www.cmake.org/cmake/resources/software.html>`_. Run the installer. Check that at the command prompt you can do something like::
C:\Users\XXXX>cmake -version
cmake version 2.8.12.2
@@ -53,24 +54,27 @@ For git, your best best is the installer from http://msysgit.github.io/. Check
C:\Users\XXXX>git --version
git version 1.9.4.msysgit.0
For 7-zip, download the installer from http://www.7-zip.org/ . Check that at the command prompt you can do something like::
For the C++ compiler, the options are a bit more complicated. There are multiple (binary incompatible) versions of Visual Studio, as well as G++ ports for windows (MinGW). Unless you are compiling the python wrappers, you can compile with MinGW, so you should obtain the `MinGW installer <http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download>`_ and run it. You should install all the packages available, and you must install to a path without spaces. ``C:\MinGW`` is recommended as an installation path. Be sure to add the binaries in ``C:\MinGW\bin\`` to your PATH variable.
C:\Users\XXXX>7z
If you are compiling for Python 2.7, you can install Visual Studio 2008 Express from `VS2008Express installer <http://go.microsoft.com/?linkid=7729279>`_.
Make sure you install ServicePack 1, otherwise your are going to get quite cryptic error messages during compilation.
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
If you are compiling for Python 3.x, you can install Visual Studio 2010 Express from `VS2010Express installer <http://www.visualstudio.com/en-us/downloads#d-2010-express>`_.
Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]
[<@listfiles...>]
If you want to build 64-bit extensions, you MUST install VS2010 Professional, which can be obtained for free if you have a student ID card from Microsoft Dreamspark
For the C++ compiler, the options are a bit more complicated. There are multiple (binary incompatible) versions of Visual Studio, as well as G++ ports for windows (MinGW). Unless you are compiling the python wrappers, you can compile with MinGW, so you should obtain the `MinGW installer <http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download>`_ and run it. You should install all the packages available, and you MUST(!!) install to a path without spaces. ``C:\MinGW`` is recommended as an installation path. Be sure to add the folder ``C:\MinGw`` to your PATH variable.
If you want to build 64-bit extensions, you MUST install professional versions of visual studio, which can be obtained for free if you have a student ID card from Microsoft Dreamspark. You will require Visual Studio 2008 Professional for python 2.x, and Visual Studio 2010 Professional for python 3.x. Otherwise you can select Visual Studio version freely.
All three compilers should co-exist happily on the path, so you should be fine installing all three, but they are rather sizeable installs.
Linux
-----
On debian based linux distributions (ubuntu, etc.), you can simply do::
sudo apt-get install cmake git g++
sudo apt-get install cmake git g++ p7zip
although ``git`` is probably already packaged with your operating system; ``g++`` probably isn't
@@ -78,7 +82,13 @@ OSX
---
OSX should come with a c++ compiler (clang), for git and cmake your best bet is `Homebrew <http://brew.sh/>`_. With Homebrew installed, you can just do::
sudo brew install cmake git
sudo brew install cmake git p7zip
If you have never done any command-line compilation before on OSX, chances are that you do not have the utilities needed. Thus you need to first install Xcode: see the description on the page http://guide.macports.org/#installing.xcode . After installing, you need to accept the license by running the following command in the Terminal::
xcodebuild -license
and explicitly typing "agree" before closing. Then you can use the compiler from the command line.
.. toctree::
:hidden: