1**calibre** supports installation from source, only on Linux. If you want to
2create installers for Windows or macOS, instructions can be found at
3https://github.com/kovidgoyal/build-calibre
4
5Note that you *do not* need to install from source to hack on the calibre
6source code. To get started with calibre development, use a normal calibre
7install and follow the instructions at
8https://manual.calibre-ebook.com/develop.html
9
10On Linux, there are two kinds of installation from source possible. Note that
11both kinds require lots of dependencies as well as a full development
12environment (compilers, headers files, etc.)
13
14All installation related functions are accessed by the command::
15
16    python setup.py
17
18For details on what functions are available, see::
19
20    python setup.py -h
21
22Or for help on any individual functions, see::
23
24    python setup.py <function> -h
25
26Note that many of these functions are only useful for creating official release
27compilations.
28
29Prerequisites
30=============
31
32In order to install calibre, you will need:
33
34  - The system dependencies listed at the bottom of
35    https://calibre-ebook.com/download_linux
36
37  - Either the raw source code available from git, or the release source code
38    available at https://download.calibre-ebook.com (preferred). There is a big
39    difference between the two, as the raw sources do not include several
40    pre-compiled resources, for example localizations and MathJax support.
41
42    For anyone familiar with autotools builds, this is somewhat similar to the
43    difference between configure.ac in git and the dist tarball after
44    autoreconf is run. i.e. users are generally expected to use the latter.
45
46Build
47=====
48
49In order to bootstrap the raw git sources to a release-ready state, run the
50command::
51
52    python setup.py bootstrap
53
54In order to compile the C/C++ extensions etc. for a release-ready tarball
55(these functions are already included by the bootstrap function), run the
56commands::
57
58    python setup.py build
59    python setup.py gui
60
61Install
62==========
63
64The first type of install will actually "install" calibre to your computer by
65putting its files into the system in the following locations:
66
67  - Binaries (actually python wrapper scripts) in <prefix>/bin
68  - Python and C modules in <prefix>/lib/calibre
69  - Resources like icons, etc. in <prefix>/share/calibre
70
71This type of install can be run by the command::
72
73    sudo python setup.py install
74
75<prefix> is normally the installation prefix of python, usually /usr.  It can
76be controlled by the --prefix option.
77
78For distro packagers, DESTDIR support is implemented via the --staging-root
79option, usually ${DESTDIR}/usr.
80
81Develop
82=============
83
84This type of install is designed to let you run calibre from your home
85directory, making it easy to hack on it.
86
87It will only install binaries into /usr/bin, but all the actual code and
88resource files will be read from the calibre source tree in your home directory
89(or wherever you choose to put it).
90
91This type of install can be run with the command::
92
93    sudo python setup.py develop
94