Skip to content

Commit

Permalink
setup.py, doc (install) and .travis.yml updated
Browse files Browse the repository at this point in the history
  • Loading branch information
davidealbanese committed Apr 4, 2016
1 parent 7d406d9 commit 6bbde07
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ before_install:
# scipy requirements
- sudo apt-get install gcc gfortran python-dev libblas-dev liblapack-dev cython
# matplotlib additional requirements
- sudo apt-get install libpng-dev libfreetype6-dev
- sudo apt-get install pkg-config libfreetype6 libfreetype6-dev libpng-dev
- pip install --upgrade pip
- pip install 'setuptools >=14.0'

install: pip install .
Expand Down
60 changes: 38 additions & 22 deletions doc/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,27 @@ micca requires `Python <https://www.python.org/>`_ >=2.7, `NumPy
<http://scipy.org/>`_ (>= 1.8.0) and the software required in order to
install `SciPy <http://scipy.org/>`_ (>= 0.13.0) through pip.

On Ubuntu Linux >=12.04
^^^^^^^^^^^^^^^^^^^^^^^
On Ubuntu Linux >= 12.04
^^^^^^^^^^^^^^^^^^^^^^^^

In Linux, we suggest install NumPy and requirements for SciPy through
the package manager. In Ubuntu Linux you can use `apt-get install`:
In Ubuntu Linux >= 12.04, we suggest install NumPy and the requirements for
SciPy and matplotlib through the package manager:

.. code-block:: sh
sudo apt-get -qq update
sudo apt-get install build-essential
sudo apt-get install python-numpy
sudo apt-get install gcc gfortran python-dev libblas-dev liblapack-dev cython
sudo apt-get install gcc gfortran python-dev libblas-dev liblapack-dev cython
sudo apt-get install pkg-config libfreetype6 libfreetype6-dev libpng-dev
Then, upgrade pip and install setuptools:

.. code-block:: sh
pip install --upgrade pip
pip install 'setuptools >=14.0'
On OS X
^^^^^^^
Expand All @@ -26,18 +37,24 @@ In OS X, we recommend to install Python from `Homebrew <http://brew.sh/>`_:

#. Install `Xcode <https://developer.apple.com/xcode/>`_;
#. Install `Homebrew <http://brew.sh/>`_;
#. Make sure the environment variable ``PATH`` is properly setted in your
``~/.bash_profile`` or ``~/.bashrc``::

.. code-block:: sh
export PATH=/usr/local/bin:$PATH
#. Install Python and gfortran:

.. code-block:: sh
brew update
brew install python
brew install gfortran
Install NumPy:

.. code-block:: sh
pip install numpy


Expand All @@ -49,7 +66,7 @@ The easiest way to install micca is to using pip, from PYPI:
.. code-block:: sh
sudo pip install micca
or from the tarball (https://github.com/compmetagen/micca/releases):

.. code-block:: sh
Expand All @@ -65,7 +82,7 @@ In order to install micca from sources (with the standard procedure
(>= 1.8.0) and SciPy (>= 0.13.0), the following Python packages must be
installed:

* Pandas >=0.17.0, <0.18.0
* Pandas >=0.17.0
* matplotlib >=1.3.0
* Biopython >=1.50
* cutadapt >=1.9
Expand All @@ -74,17 +91,16 @@ installed:
The easiest way to install these packages is to is using pip:

.. code-block:: sh
sudo pip install 'pandas >=0.17.0, <0.18.0' 'matplotlib >=1.3.0' 'biopython >= 1.50' 'cutadapt >=1.9' 'biom-format >=1.3.1'
sudo pip install 'pandas >=0.17.0' 'matplotlib >=1.3.0' 'biopython >= 1.50' 'cutadapt >=1.9' 'biom-format >=1.3.1'
Download the latest version from
https://github.com/compmetagen/micca/releases and complete the
installation:

.. code-block:: sh
tar -zxvf micca-X.Y.Z.tar.gz
python setup.py build
sudo python setup.py install
If you don’t have root access, install micca in a local directory by
Expand All @@ -96,10 +112,10 @@ specifying the ``--prefix`` argument. Then you need to set
python setup.py install --prefix=/path/to/modules
export PYTHONPATH=$PYTHONPATH:/path/to/modules/lib/python{version}/site-packages
.. note::
.. note::

In order to export the variable permanently add the command
at the bottom of your ``.bashrc`` file.
at the bottom of your ``~/.bash_profile`` or ``~/.bashrc`` file.


Testing the installation
Expand All @@ -108,7 +124,7 @@ Testing the installation
.. code-block:: sh
micca -h
Install RDP classifier (optional)
---------------------------------
Expand All @@ -126,19 +142,19 @@ can be used in the :doc:`/commands/classify` command (option
Download and unzip the file (RDP cladssifier v2.11 2015-09-14):

.. code-block:: sh
wget https://sourceforge.net/projects/rdp-classifier/files/rdp-classifier/rdp_classifier_2.11.zip
unzip rdp_classifier_2.11.zip
Now you must set the environment variable ``RDPPATH`` by typing:

.. code-block:: sh
$ export RDPPATH=/path-to-rdp-classifier/rdp_classifier_2.11/
e.g. ``export RDPPATH=/Users/David/rdp_classifier_2.11``.
e.g. ``export RDPPATH=/Users/David/rdp_classifier_2.11``.

.. note::

In order to export the variable permanently add the latest command
at the bottom of your ``.bashrc`` file.
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ def run(self):
author_email='[email protected]',
maintainer='Davide Albanese',
maintainer_email='[email protected]',
# setup_requires must be repeated in install_requires
setup_requires=['numpy >= 1.8.0'],
install_requires=[
'numpy >= 1.8.0',
'scipy >=0.14.0',
Expand Down

0 comments on commit 6bbde07

Please sign in to comment.