File: install.rst

package info (click to toggle)
python-blosc 1.4.4%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 380 kB
  • ctags: 304
  • sloc: python: 1,801; ansic: 384; makefile: 147
file content (109 lines) | stat: -rw-r--r-- 2,869 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
------------
Installation
------------

python-blosc comes with C Blosc sources, so it does not depend on any other
library (bar Python itself of course). Of course, if you are going to install
from sources, you are going to need a C compiler (GCC, clang and MSVC
2008/2010/2012/2015 have been tested).

Also, there are situations where you may want to link with an already existing
Blosc library in your system.  You can do that too.

This package supports Python 2.6, 2.7 and 3.3 or higher versions.

Installing from PyPI repository
===============================

Do:

.. code-block:: console

  $ pip install -U blosc


Building manually
=================

First, go to the python-blosc official repository at
https://github.com/Blosc/python-blosc and download the sources.

Then, there are different ways to compile python-blosc, depending on whether
you want to link with an already installed Blosc library or not.

Compiling without an installed Blosc library
--------------------------------------------

python-blosc comes with the Blosc sources with it so, assuming that you
have a C compiler installed, do:

.. code-block:: console

    $ python setup.py build_ext --inplace

That's all.  You can proceed with testing section now.

Compiling with an installed Blosc library
-----------------------------------------

In case you have Blosc installed as an external library (and disregard
the included Blosc sources) you can link with it in a couple of ways.

Using an environment variable:

.. code-block:: console

    $ BLOSC_DIR=/usr/local     (or "set BLOSC_DIR=\blosc" on Win)
    $ export BLOSC_DIR         (not needed on Win)
    $ python setup.py build_ext --inplace

Using a flag:

.. code-block:: console

    $ python setup.py build_ext --inplace --blosc=/usr/local

Generating Sphinx documentation
-------------------------------

In case you want to generate the documentation locally, you will need to
have the `Sphinx` documentation system, as well as the `numpydoc`
extension, installed.  Then go down to `doc/` directory and do:

.. code-block:: console

    $ make html|latex|latexpdf

Testing
=======

After compiling, you can quickly check that the package is sane by
running the doctests in ``blosc/test.py``:

.. code-block:: console

    $ PYTHONPATH=.   (or "set PYTHONPATH=." on Win)
    $ export PYTHONPATH=.  (not needed on Win)
    $ python blosc/test.py  (add -v for verbose mode)

Or alternatively, you can use the third-party ``nosetests`` script to run both
the doctests and the test suite:

.. code-block:: console

    $ nosetests --with-doctest (add -v for verbose mode)

Once installed, you can re-run the tests at any time with:

.. code-block:: console

    $ python -c "import blosc; blosc.test()"

Installing
==========

Install it as a typical Python package:

.. code-block:: console

    $ python setup.py install