.. moduleauthor:: Paul Ross .. sectionauthor:: Paul Ross .. Installing TotalDepth ####################################### Installing TotalDepth ####################################### ******************************************* Requirements ******************************************* For TotalDepth will need to have installed [link to]: * Python 3 [`Python `_] * Cython [`Cython `_] * numpy [`numpy `_] TotalDepth has been tested with these specific versions: * Python 3.2 * Cython 0.14.1 * numpy 1.6.0.b2 TotalDepth is usually tested on some variant of Mac Os X such as 10.6 ('Snow Leopard') or later. ******************************************* Downloading ******************************************* TotalDepth's home is at http://sourceforge.net/projects/totaldepth/ From there you can either download a ZIP archive from the files section or pull from the repo. In any case you will unzip/pull to a directory of your choice referred to hereon as :file:`{}`. From a ZIP Release ======================== Unzip the TotalDepth ZIP to :file:`{}` From the Hg Repo =========================== Read-only access (anybody):: $ cd $ hg clone http://hg.code.sf.net/p/totaldepth/code-0 . ******************************************* Installing and Testing ******************************************* Installing ================== Setting the Environment -------------------------- Put :file:`{}/src` on your ``$PYTHONPATH`` Check that your default version of Python is Python 3:: $python --version Python 3.2 Building Cython Code --------------------------- Some parts of TotalDepth need to be built with Cython by hand (and you must have installed whatever Cython needs). The commands to do this are:: cd /src/TotalDepth/LIS/core python setup.py build_ext --inplace Testing ============================ To see if TotalDepth can be imported from your ``$PYTHONPATH``:: $ python Python 3.2 (r32:88452, Feb 20 2011, 11:12:31) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import TotalDepth >>> dir(TotalDepth) ['ExceptionTotalDepth', 'RELEASE_NOTES', 'VERSION', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__name__', '__package__', '__path__'] >>> TotalDepth.VERSION (0, 1, 0) See :doc:`testing/test_plot` for comprehensive testing of your installation to see if LIS/LAS files can be written, read and plotted. This pretty much executes all TotalDepth code. See :doc:`testing/unit_tests` for more information about testing and unit tests.