Gaphor en macOS

La última versión de Gaphor puede descargarse de la página de descargas de Gaphor. Gaphor también puede instalarse como Homebrew cask.

Las versiones anteriores están disponibles en GitHub.

También están disponibles construcciones CI.

Entorno de desarrollo

To set up a development environment with macOS:

  1. Instalar Homebrew

  2. Abra un terminal y ejecute:

brew install python3 gobject-introspection gtk4 gtksourceview5 libadwaita adwaita-icon-theme graphviz

Instale Poetry usando pipx:

pipx install poetry

Next, clone the repository, after which you can execute the following consecutive commands to install the poetry environment:

cd gaphor
poetry install
poetry run pre-commit install

Now, you can run gaphor as

poetry run gaphor

If PyGObject does not compile and complains about a missing ffi.h file, you may want to install libffi from Homebrew, and set the following environment variable and run poetry install again:

brew install libffi
export PKG_CONFIG_PATH=$(brew --prefix libffi)/lib/pkgconfig
poetry install

Depuración con Visual Studio Code

Before you start debugging you’ll need to open Gaphor in VSCode (the folder containing pyproject.toml). You’ll need to have the Python extension installed.

Create a file .vscode/launch.json with the following content:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Gaphor UI",
            "type": "python",
            "request": "launch",
            "module": "gaphor",
            "justMyCode": false
        }
    ]
}

Empaquetado para macOS

Para crear un paquete de instalación exe para macOS, usamos PyInstaller que analiza Gaphor para encontrar todas las dependencias y agruparlas en una única carpeta.

  1. Siga las instrucciones anteriores para configurar un entorno de desarrollo

  2. Abra un terminal y ejecute lo siguiente desde el directorio del repositorio:

poetry run python po/build-babel.py
poetry install --with packaging
poetry run poe package