Commit 7fbe30cd45996003108a4651eda41c122fc51267

Authored by Jürgen Knödlseder
1 parent 857e5667

Update installation section of user documentation

doc/source/admin/download.rst
... ... @@ -3,21 +3,11 @@
3 3 Download
4 4 ========
5 5  
6   -GammaLib can be obtained in form of releases or directly from the git
7   -development repository. Prefer a release if you intend using GammaLib
8   -for production (and publications). Clone the code from git if you need
9   -the most recent code that implements new features and corrects known
10   -bugs.
11   -
12   -
13   -Releases
14   ---------
15   -
16 6 The latest GammaLib release is
17 7 `gammalib-1.4.3 <http://cta.irap.omp.eu/ctools/releases/gammalib/gammalib-1.4.3.tar.gz>`_
18 8 (31 October 2017).
19 9  
20   -Below a table of older GammaLib releases. Please read the :ref:`sec_release` to
  10 +Below a list of older GammaLib releases. Please read the :ref:`sec_release` to
21 11 learn more about new features and corrected bugs in a given release.
22 12  
23 13 To download an older release, click on the corresponding release number:
... ... @@ -45,69 +35,3 @@ To download an older release, click on the corresponding release number:
45 35 `0.4.10 <http://cta.irap.omp.eu/ctools/releases/gammalib/gammalib-00-04-10.tar.gz>`_
46 36 `0.4.9 <http://cta.irap.omp.eu/ctools/releases/gammalib/gammalib-00-04-09.tar.gz>`_
47 37 `0.4.7 <http://cta.irap.omp.eu/ctools/releases/gammalib/gammalib-00-04-07.tar.gz>`_
48   -
49   -
50   -Development release
51   --------------------
52   -
53   -The current GammaLib development release is
54   -`gammalib-1.5.0.dev1 <http://cta.irap.omp.eu/ctools/releases/gammalib/gammalib-1.5.0.dev1.tar.gz>`_.
55   -This release reflects the status of the current ``devel`` branch of
56   -the GammaLib git repository.
57   -
58   -
59   -Git repository
60   ---------------
61   -
62   -To clone the gammalib source code, type
63   -
64   -.. code-block:: bash
65   -
66   - $ git clone https://cta-gitlab.irap.omp.eu/gammalib/gammalib.git
67   -
68   -This will create a gammalib directory under the current working directory
69   -that will contain the gammalib source code. In case that the cloning does
70   -not work you may try adding
71   -
72   -.. code-block:: bash
73   -
74   - $ export GIT_SSL_NO_VERIFY=true
75   -
76   -or
77   -
78   -.. code-block:: bash
79   -
80   - $ git config --global http.sslverify "false"
81   -
82   -before retrieving the code.
83   -Before you will be able to compile the code you need to generate the
84   -configuration file using the ``autogen.sh`` script.
85   -Also make sure that you're actually on the devel branch of the git
86   -repository. GammaLib can be compiled and configured using
87   -the following command sequence (the code will be installed into the
88   -``/usr/local/gamma`` directory):
89   -
90   -.. code-block:: bash
91   -
92   - $ cd gammalib
93   - $ git checkout devel
94   - $ ./autogen.sh
95   - $ ./configure
96   - $ make
97   - $ make check
98   - $ sudo make install
99   - $ export GAMMALIB=/usr/local/gamma
100   - $ source $GAMMALIB/bin/gammalib-init.sh
101   -
102   -Please read the :ref:`sec_installation` section if you need more information on
103   -how to install GammaLib.
104   -
105   -.. note::
106   -
107   - You need `swig <http://www.swig.org/>`_ on your system to build the
108   - Python wrappers when you get the code from Git. Python wrappers are
109   - not stored in the Git repository but are built using
110   - `swig <http://www.swig.org/>`_ from interface files located in the
111   - pyext folder. However, you do not need `swig <http://www.swig.org/>`_
112   - when fetching a release as the Python wrappers are bundled with the
113   - release tarballs.
... ...
doc/source/admin/index.rst
... ... @@ -8,6 +8,7 @@ Getting GammaLib
8 8  
9 9 install_conda
10 10 install_source
  11 + install_devel
11 12 download
12 13 release_history/index
13 14  
... ...
doc/source/admin/install_conda.rst 0 → 100644
  1 +.. _sec_install_conda:
  2 +
  3 +Installing via Anaconda
  4 +=======================
  5 +
  6 +`Anaconda <https://www.anaconda.com/download/>`_ (you can also use
  7 +`Miniconda <https://conda.io/miniconda.html>`_ for a smaller footprint) is a
  8 +scientific Python installation shipping with essentially all needed packages.
  9 +Install it according to the instructions on their homepage. You can use any
  10 +Anaconda Python version. An Anaconda Python installation is completely separate
  11 +from any existing system wide or user space Python installation, so Anaconda
  12 +can be tested without the fear of breaking an existing installation.
  13 +
  14 +**Anaconda GammaLib packages exist for Mac OS X and Linux distributions. Windows
  15 +is not supported.**
  16 +
  17 +
  18 +Installing
  19 +----------
  20 +
  21 +- `Install Anaconda following the instructions on their site <https://www.anaconda.com/download/>`_
  22 +
  23 +- Add the ``conda-forge`` and ``cta-observatory`` channels to your Anaconda
  24 + configuration
  25 +
  26 + .. code-block:: bash
  27 +
  28 + $ conda config --append channels conda-forge
  29 + $ conda config --append channels cta-observatory
  30 +
  31 +- We strongly recommend to work with separate Anaconda environments, and
  32 + especially not use the special root environment (that is used for all conda
  33 + commands and environment manipulations, package installations etc.) for
  34 + anything besides updating the conda package itself. For example create
  35 + a ``myenv`` environment as follows:
  36 +
  37 + .. code-block:: bash
  38 +
  39 + $ conda create -n myenv python=2.7 # or e.g. python=3.5
  40 + $ source activate myenv
  41 + (myenv) $
  42 +
  43 +- Install pre-compiled GammaLib conda package from Anaconda cloud with:
  44 +
  45 + .. code-block:: bash
  46 +
  47 + (myenv) $ conda install gammalib
  48 +
  49 + This will also install the required dependencies, and in particular cfitsio.
  50 +
  51 +- Re-activate your environment to initialise the GammaLib environment variables
  52 +
  53 + .. code-block:: bash
  54 +
  55 + (myenv) $ source activate myenv
  56 +
  57 +
  58 +Testing
  59 +-------
  60 +
  61 +Type the following to test the GammaLib package
  62 +
  63 +.. code-block:: bash
  64 +
  65 + (myenv) $ python -c 'import gammalib; gammalib.test()'
  66 +
  67 +
  68 +Updating
  69 +--------
  70 +
  71 +Type the following to update the GammaLib package
  72 +
  73 +.. code-block:: bash
  74 +
  75 + (myenv) $ conda update gammalib
  76 +
  77 +or (if you did not add the ``cta-observatory`` channel to your default
  78 +channels):
  79 +
  80 +.. code-block:: bash
  81 +
  82 + (myenv) $ conda update -c cta-observatory gammalib
... ...
doc/source/admin/install_devel.rst 0 → 100644
  1 +.. _sec_install_devel:
  2 +
  3 +Installing the development version
  4 +==================================
  5 +
  6 +The current development version of the code can be downloaded as source
  7 +tarballs or directly from the `Git <https://git-scm.com/>`_ repository.
  8 +
  9 +The current GammaLib development release is ``gammalib-1.5.0.dev1``.
  10 +
  11 +
  12 +Source tarball
  13 +--------------
  14 +
  15 +Download the source tarball from the following link
  16 +
  17 +- `GammaLib <http://cta.irap.omp.eu/ctools/releases/gammalib/gammalib-1.5.0.dev1.tar.gz>`_
  18 +
  19 +and follow the instructions on :ref:`sec_install_source`.
  20 +
  21 +
  22 +Git repository
  23 +--------------
  24 +
  25 +To clone the gammalib source code, type
  26 +
  27 +.. code-block:: bash
  28 +
  29 + $ git clone https://cta-gitlab.irap.omp.eu/gammalib/gammalib.git
  30 +
  31 +This will create a directory named gammalib under the current
  32 +working directory that will contain the gammalib source code.
  33 +In case that the cloning does not work you may try adding
  34 +
  35 +.. code-block:: bash
  36 +
  37 + $ export GIT_SSL_NO_VERIFY=true
  38 +
  39 +or
  40 +
  41 +.. code-block:: bash
  42 +
  43 + $ git config --global http.sslverify "false"
  44 +
  45 +before retrieving the code.
  46 +Before you will be able to compile the code you need to generate the
  47 +configuration file using the ``autogen.sh`` script.
  48 +Also make sure that you're actually on the devel branch of the git
  49 +repository. GammaLib can be compiled and configured using
  50 +the following command sequence (the code will be installed into the
  51 +``/usr/local/gamma`` directory):
  52 +
  53 +.. code-block:: bash
  54 +
  55 + $ cd gammalib
  56 + $ git checkout devel
  57 + $ ./autogen.sh
  58 + $ ./configure
  59 + $ make
  60 + $ make check
  61 + $ sudo make install
  62 + $ export GAMMALIB=/usr/local/gamma
  63 + $ source $GAMMALIB/bin/gammalib-init.sh
  64 +
  65 +Please read the :ref:`sec_install_source` section if you need more information
  66 +on how to install GammaLib.
  67 +
  68 +.. note::
  69 + You need `swig <http://www.swig.org/>`_ on your system to build the
  70 + Python wrappers when you get the code from Git. Python wrappers are
  71 + not stored in the Git repository but are built using
  72 + `swig <http://www.swig.org/>`_ from interface files located in the
  73 + pyext folder. However, you do not need `swig <http://www.swig.org/>`_
  74 + when fetching a release as the Python wrappers are bundled with the
  75 + release tarballs.
... ...
doc/source/admin/install_source.rst
1   -.. _sec_installation:
  1 +.. _sec_install_source:
2 2  
3   -Installation
4   -============
  3 +Installation from source code
  4 +=============================
5 5  
6   -.. note ::
  6 +Compiling GammaLib from source is the recommended method to install the package
  7 +in case that you do not use Anaconda (if you use Anaconda, please follow
  8 +the instructions at :ref:`sec_install_conda`, and better do not try to compile
  9 +the source code against your Anaconda Python installation). You also need to
  10 +compile from source if you want to use the development version of GammaLib.
7 11  
  12 +.. note ::
8 13 These installation instructions apply to gammalib-1.1.0 and
9   - later. gammalib-1.1.0 has been built, installed and tested
  14 + later. gammalib-1.1.0 was built, installed and tested
10 15 successfully on Debian, Ubuntu, Mandriva, OpenSUSE, Scientific Linux,
11 16 CentOS, Mac OS X, FreeBSD, and OpenSolaris (using gcc), so
12   - hopefully it also installs on your distribution. In case you encounter
13   - problems, please post a report on the bug tracker or send an e-mail to the
14   - `mailing list <mailto:ctools@irap.omp.eu>`_.
  17 + hopefully it also installs on your distribution.
  18 + **Windows is not supported.**
  19 + In case you encounter problems, please post a report on the bug tracker or
  20 + send an e-mail to the `mailing list <mailto:ctools@irap.omp.eu>`_.
15 21  
16   -.. _getting:
17 22  
18 23 Getting GammaLib
19 24 ----------------
20 25  
21 26 The latest version of the GammaLib source code, documentation, and
22 27 example programs are available on the World-Wide Web from
23   -`http://cta.irap.omp.eu/ctools/download.html <http://cta.irap.omp.eu/ctools/download.html>`_.
  28 +`http://cta.irap.omp.eu/gammalib/download.html <http://cta.irap.omp.eu/gammalib/download.html>`_.
24 29  
25   -.. _prerequisits:
26 30  
27 31 Prerequisites
28 32 -------------
... ... @@ -43,7 +47,9 @@ and installed from the source files (for details, please refer to the
43 47 installation instructions on the
44 48 `HEASARC <http://heasarc.gsfc.nasa.gov/fitsio>`_ site). We recommend
45 49 installation of cfitsio in the default GammaLib install directory as a
46   -shared library by typing ::
  50 +shared library by typing
  51 +
  52 +.. code-block:: bash
47 53  
48 54 $ ./configure --prefix=/usr/local/gamma
49 55 $ make shared
... ... @@ -71,53 +77,27 @@ the Python development package including the ``Python.h`` header file needs
71 77 to be installed on your system.
72 78  
73 79  
74   -.. _build:
75   -
76 80 Building GammaLib
77 81 -----------------
78 82  
79   -.. note ::
80   -
81   - You will now learn how to build the GammaLib library from the source files.
82   - For Mac OS X there exist also binary packages that are bundled together
83   - with ctools, and we recommend using directly these binary packages. The
84   - Mac OS X binary packages can be downloaded
85   - `here <http://cta.irap.omp.eu/ctools/download.html>`_.
86   -
87   -.. note ::
88   -
89   - If you need the latest source code from the git repository that has not
90   - yet been released you may also clone the gammalib git repository using ::
91   -
92   - $ git clone https://cta-gitlab.irap.omp.eu/gammalib/gammalib.git
93   -
94   - In case you encounter an SSL certificat problem, type ::
95   -
96   - $ export GIT_SSL_NO_VERIFY=true
97   -
98   - before cloning from git. Step then in the cloned ``gammalib`` directory
99   - and type ::
100   -
101   - $ git checkout devel
102   - $ ./autogen.sh
103   -
104   - This will make sure that you use the development trunk. It also
105   - creates the configuration file that is needed to configure
106   - GammaLib before compilation. Continue then with the procedure below
107   - starting with ``./configure``.
108   -
109 83 To build GammaLib from the source files, download the latest release
110 84 tarball, save it in an appropriate location,
111   -and type ::
  85 +and type
  86 +
  87 +.. code-block:: bash
112 88  
113 89 $ tar xvfz gammalib-x.y.z.tar.gz
114 90  
115 91 where ``x.y.z`` is the version number of the library. Step in the created
116   -directory using ::
  92 +directory using
  93 +
  94 +.. code-block:: bash
117 95  
118 96 $ cd gammalib-x.y.z
119 97  
120   -and build GammaLib by typing ::
  98 +and build GammaLib by typing
  99 +
  100 +.. code-block:: bash
121 101  
122 102 $ ./configure
123 103 $ make
... ... @@ -127,30 +107,49 @@ Makefiles for your particular system, the make command compiles the
127 107 source files and builds the C++ library and Python module. Type
128 108 ``./configure`` and not simply ``configure`` to ensure that the configuration
129 109 script in the current directory is used and not some other system-wide
130   -configuration script. By default, the install directory is set to
131   -``/usr/local/gamma``. To change the install directory, provide an optional
132   -``--prefix`` argument, for example ::
  110 +configuration script.
  111 +
  112 +.. note::
  113 + To accelerate compilation you may type
  114 +
  115 + .. code-block:: bash
  116 +
  117 + $ make -j8
  118 +
  119 + which will instruct the automake system to perform a parallelized compilation,
  120 + where ``8`` specifies the maximum number of parallel threads (set this number
  121 + to about twice the number of cores you have available).
  122 +
  123 +By default, the install directory is set to ``/usr/local/gamma``. To change the
  124 +install directory, provide an optional ``--prefix`` argument, for example
  125 +
  126 +.. code-block:: bash
133 127  
134 128 $ ./configure --prefix=/usr/local
135 129  
136 130 If cfitsio and/or readline is not installed in a standard location for
137 131 libraries (such as ``/usr/lib`` or ``/usr/local/lib``), you can specify
138 132 the appropriate location(s) using the ``LDFLAGS`` (for the library
139   -directory) and ``CPPFLAGS`` (for the include directory) options::
  133 +directory) and ``CPPFLAGS`` (for the include directory) options
  134 +
  135 +.. code-block:: bash
140 136  
141 137 $ ./configure LDFLAGS='-L/opt/local/lib' CPPFLAGS='-I/opt/local/include'
142 138  
143   -You can find a full list of configuration options using ::
  139 +You can find a full list of configuration options using
  140 +
  141 +.. code-block:: bash
144 142  
145 143 $ ./configure --help
146 144  
147   -.. _test:
148 145  
149 146 Testing GammaLib
150 147 ----------------
151 148  
152 149 Before you install GammaLib you should test the C++ library and Python
153   -module by typing::
  150 +module by typing
  151 +
  152 +.. code-block:: bash
154 153  
155 154 $ make check
156 155  
... ... @@ -174,16 +173,19 @@ Eventually, loading the shared cfitsio and/or readline libraries may
174 173 fail during the test if the libraries are not located in standard
175 174 locations. In this case, add the library directories to the
176 175 ``LD_LIBRARY_PATH`` environment variables (``DYLD_LIBRARY_PATH`` on Mac OS
177   -X), e.g. ::
  176 +X), e.g.
  177 +
  178 +.. code-block:: bash
178 179  
179 180 $ export LD_LIBRARY_PATH=/opt/local/lib:$LD_LIBRARY_PATH
180 181  
181   -.. _install:
182 182  
183 183 Installing GammaLib
184 184 -------------------
185 185  
186   -Now you are ready to install GammaLib by typing ::
  186 +Now you are ready to install GammaLib by typing
  187 +
  188 +.. code-block:: bash
187 189  
188 190 $ make install
189 191  
... ... @@ -192,7 +194,6 @@ case that you need administrator privileges to access the install
192 194 directory. If you do not have such privileges, chose an install directory
193 195 that you can access using the ``--prefix`` option.
194 196  
195   -.. _setup:
196 197  
197 198 Setting up your environment
198 199 ---------------------------
... ... @@ -217,13 +218,11 @@ If you use C shell or a variant then add the following to your
217 218 setenv GAMMALIB /usr/local/gamma
218 219 source $GAMMALIB/bin/gammalib-init.csh
219 220  
220   -.. _documentation:
221 221  
222 222 Installing documentation
223 223 ------------------------
224 224  
225 225 .. note ::
226   -
227 226 The documentation of the latest GammaLib release can be found at
228 227 `http://cta.irap.omp.eu/gammalib/ <http://cta.irap.omp.eu/gammalib/>`_.
229 228 The documentation corresponding to the git development branch can be
... ... @@ -251,19 +250,25 @@ complete documentation of the implemented C++ classes in a set of html
251 250 pages. In addition, it will create a set of man files that can be accessed
252 251 using the ``man`` command.
253 252  
254   -To build and install all documentation, type the following::
  253 +To build and install all documentation, type the following
  254 +
  255 +.. code-block:: bash
255 256  
256 257 $ ./configure
257 258 $ make doc
258 259 $ make install
259 260  
260   -To build only user documentation, type::
  261 +To build only user documentation, type
  262 +
  263 +.. code-block:: bash
261 264  
262 265 $ ./configure
263 266 $ make sphinx
264 267 $ make install
265 268  
266   -and to build only Doxygen documentation, type::
  269 +and to build only Doxygen documentation, type
  270 +
  271 +.. code-block:: bash
267 272  
268 273 $ ./configure
269 274 $ make doxygen
... ... @@ -273,7 +278,9 @@ The Doxygen documentation will be installed into
273 278 ``$(prefix)/share/doc/gammalib/html/doxygen`` and can be browsed using a
274 279 regular web browser.
275 280  
276   -To check man support, type for example ::
  281 +To check man support, type for example
  282 +
  283 +.. code-block:: bash
277 284  
278 285 $ man GObservations
279 286  
... ...
doc/source/admin/release_history/index.rst
... ... @@ -3,28 +3,20 @@
3 3 Release History
4 4 ===============
5 5  
6   -Major releases:
7   -
8 6 .. toctree::
9 7 :maxdepth: 1
10 8  
11 9 GammaLib 1.5 <1.5>
12   - GammaLib 1.4 <1.4>
13   - GammaLib 1.3 <1.3>
14   - GammaLib 1.2 <1.2>
15   - GammaLib 1.1 <1.1>
16   - GammaLib 1.0 <1.0>
17   -
18   -Bug fix releases:
19   -
20   -.. toctree::
21   - :maxdepth: 1
22   -
23 10 GammaLib 1.4.3 <1.4.3>
24 11 GammaLib 1.4.2 <1.4.2>
25 12 GammaLib 1.4.1 <1.4.1>
  13 + GammaLib 1.4 <1.4>
26 14 GammaLib 1.3.1 <1.3.1>
  15 + GammaLib 1.3 <1.3>
  16 + GammaLib 1.2 <1.2>
  17 + GammaLib 1.1 <1.1>
27 18 GammaLib 1.0.1 <1.0.1>
  19 + GammaLib 1.0 <1.0>
28 20  
29 21 For older GammaLib versions see
30 22 `here <https://cta-redmine.irap.omp.eu/projects/gammalib/wiki/Release_notes>`_.
... ...