This document is intended for software engineers and translators who would like to help out with the development of Cozy, or simply be able to run bleeding edge versions of the code locally.
Cozy can be built and run with GNOME Builder.
- Open GNOME Builder
- Click the Clone Repository button
- Enter
https://github.com/geigi/cozy.git
in the Repository URL field - Click the Clone Project button
- Click the
▶️ Run button to start building the application
The below instructions have been tested on Ubuntu 20.04 and Fedora 39
sudo apt update
sudo apt install \
appstreamcli \
cmake \
gettext \
git \
gstreamer1.0-libav \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-ugly \
libgirepository1.0-dev \
libgstreamer1.0-0 \
libgtk-4-dev \
libadwaita-1-dev \
pip \
python-gi-cairo \
python3-gst-1.0 \
python3-venv
sudo dnf install \
appstream \
cmake \
gettext \
gstreamer1-libav \
gstreamer1-plugins-ugly \
gstreamer1-plugins-bad \
gstreamer1-plugins-good \
gstreamer1-devel\
gtk4-devel \
libadwaita-devel \
pipenv \
python3-cairo-devel \
python3-gstreamer1
git clone https://github.com/geigi/cozy.git
cd cozy
Tip
It is generally a good idea to set up a virtual environment for Python projects. It creates an isolated environment where packages can be installed without creating conflicts with other packages installed system-wide.
python3 -m venv venv
source ./venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install meson ninja
pip install pytest pytest-mock
To enter the virtual environment, you will need to run source ./venv/bin/activate
every time you reopen your terminal.
Let's assume you wish to build the application under the build/
directory and install the binaries under app/
:
meson setup --prefix=$(pwd)/app ./build
ninja -C build install
ninja -C build com.github.geigi.cozy-update-po
ninja -C build extra-update-po
XDG_DATA_DIRS=app/share:/usr/share \
PYTHONPATH=app/lib/python3.11/site-packages \
app/bin/com.github.geigi.cozy
Your Python path may be different so you might need to amend the PYTHONPATH
environment variable above in case of errors.
Note
Every time you make changes to the code, you need to execute ninja -C build install
before you run the application.
python -m pytest