Debian Codegraph @

docs/install.rst

raw
1 Install
2 =======
3
4 The bindings to the LZ4 compression library provided by this package are in the
5 form of a Python extension module written in C. These extension modules need to
6 be compiled against the LZ4 library and the Python
7
8 Installing from pre-built wheels
9 --------------------------------
10
11 The package is hosted on `PyPI <https://pypi.org/project/lz4/>`_ and pre-built
12 wheels are available for Linux, OSX and Windows. Installation using a pre-built
13 wheel can be achieved by::
14
15 $ pip install lz4
16
17
18 Installing from source
19 ----------------------
20
21 The LZ4 bindings require linking to the LZ4 library, and so if there is not a
22 pre-compiled wheel available for your platform you will need to have a suitable
23 C compiler available, as well as the Python development header files. On
24 Debian/Ubuntu based systems the header files for Python are found in the
25 distribution package ``pythonX.Y-dev`` e.g. ``python3.8-dev``. On Fedora/Red Hat
26 based systems, the Python header files are found in the distribution package
27 ``python-devel``.
28
29 The LZ4 library bindings provided by this package require the LZ4 library. If
30 the system already has an LZ4 library and development header files present, and
31 the library is a recent enough version the package will build against that.
32 Otherwise, the package will use a bundled version of the library files to link
33 against. The package currently requires LZ4 version 1.7.5 or later.
34
35 On a system for which there are no pre-built wheels available on PyPi, running
36 this command will result in the extension modules being compiled from source::
37
38 $ pip install lz4
39
40 On systems for which pre-built wheels are available, the following command will
41 force a local compilation of the extension modules from source::
42
43 $ pip install --no-binary :all: --no-cache-dir lz4
44
45 The package can also be installed manually from a checkout of the source code
46 git repository::
47
48 $ python setup.py install
49
50 Several packages need to be present on the system ahead of running this command.
51 They can be installed using ``pip``::
52
53 $ pip install -r requirements.txt
54
55 Test suite
56 ----------
57
58 The package includes an extensive test suite that can be run using::
59
60 $ python setup.py test
61
62 or, preferably, via ``tox``::
63
64 $ tox
65
66 Documentation
67 -------------
68
69 The package also includes documentation in the ``docs`` directory. The
70 documentation is built using `Sphinx <http://www.sphinx-doc.org/en/stable/>`_,
71 and can be built using the included ``Makefile``::
72
73 $ cd docs
74 $ make html
75
76 To see other documentation targets that are available use the command ``make help``.