Build a Debian Package¶
The deb package that a release has, for a release of Debian or Ubuntu, built in a container of it.
The package is built from debian/ with dpkg-buildpackage, the way CI does it. It installs the build dependencies and some static libraries system wide, so build it in a container of the release you want it for (ubuntu:24.04, ubuntu:22.04, debian:trixie or debian:bookworm).
- Install Docker
- Clone the repository
git clone --recursive https://github.com/libmonero/monero-python.git -
Build, replacing
ubuntu:24.04with the release you wantdocker run --rm -it -v <MONERO_PYTHON_DIR_FULL_PATH>:/monero-python -w /monero-python ubuntu:24.04 bash -c ' apt-get update && apt-get install -y dpkg-dev && apt-get build-dep -y ./ && debian/set-version.sh && dpkg-buildpackage --build=binary --no-sign && mkdir -p debian/artifacts && mv ../python3-monero_* debian/artifacts/'MONERO_PYTHON_DIR_FULL_PATH- full path tomonero-pythondirectorydebian/set-version.shadds an entry for the version ofpyproject.tomltodebian/changelog, there is no need to commit it- add
--jobs=4todpkg-buildpackageto build faster, each compiler needs 1 to 2 GB of memory
-
The package is placed in
monero-python/debian/artifacts