calibre/bypy
Kovid Goyal 1adc288f70
Bump python patch version
Might as well since we are anyway updating all deps and 3.14.2 fixes
various regression in 3.14.
2025-12-10 23:24:05 +05:30
..
linux Fix incorrect sqlite soname in frozen Linux bundle 2025-09-26 09:32:46 +05:30
macos Bump some library versions 2025-12-09 23:56:16 +05:30
windows The path to wix.exe has changed. Sigh. 2025-12-09 23:56:17 +05:30
init_env.py Remove no longer present Qt Wayland DLL 2025-12-09 23:56:16 +05:30
linux.conf
macos.conf Update all dependencies 2025-12-09 23:56:16 +05:30
README.rst
rsync.conf
run-python.h
sources.json Bump python patch version 2025-12-10 23:24:05 +05:30
windows.conf ... 2025-12-10 10:24:47 +05:30

Build the calibre installers, including all dependencies from scratch
=======================================================================

This folder contains code to automate the process of building calibre,
including all its dependencies, from scratch, for all platforms that calibre
supports.

In general builds proceed in two steps, first build all the dependencies, then
build the calibre installer itself.

Requirements
---------------

Building *must* run on a Linux computer.

First create some empty top level directory and run the following commands::

    git clone https://github.com/kovidgoyal/bypy.git
    git clone https://github.com/kovidgoyal/calibre.git
    cd calibre

Now we need to bootstrap calibre, for which all its Linux build dependencies
must have already been installed (see the `Dependencies
<https://calibre-ebook.com/download_linux>`_ section of the Linux installation
page for details). Once the dependencies are installed, run::

    ./setup.py bootstrap

All building is done inside QEMU VMs. Linux VMs are auto-created as needed,
Windows and macOS VMs must be created manually. Instructions on
creating the VMs are in the bypy repo under :file:`virtual_machine/README.rst`.
Required software for the VMs are listed in :file:`bypy/windows.conf` and
:file:`bypy/macos.conf`.

Linux
-------

To build the Intel and ARM dependencies for calibre, run::

    ./setup.py build_dep linux
    ./setup.py build_dep linux-arm64

The output (after a very long time) will be in :literal:`bypy/b/linux/[32|64]`

Now you can build the calibre Linux tarballs with::

    ./setup.py linux

The output will be in :file:`dist`


macOS
--------------

Name the QEMU VM using ``vm_name`` from :literal:`bypy/macos.conf`.
Make sure all software mentioned in :file:`bypy/macos.conf` is installed.
To build the dependencies for calibre, run::

    ./setup.py build_dep macos

The output (after a very long time) will be in :literal:`bypy/b/macos`.
Now you can build the calibre ``.dmg`` with::

    ./setup.py osx --dont-sign --dont-notarize

The output will be in :file:`dist`


Windows
-------------

Name the QEMU VM using ``vm_name`` from :file:`bypy/windows.conf`.
Make sure all software mentioned in :file:`bypy/windows.conf` is installed.

To build the dependencies for calibre, run::

    ./setup.py build_dep windows

The output (after a very long time) will be in :literal:`bypy/b/windows/64`.
Now you can build the calibre windows installers with::

    ./setup.py win64 --dont-sign

The output will be in :file:`dist`