Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish to PyPI

# Uploads with PyPI Trusted Publishing, so no API token is stored here.
# PyPI accepts only this file name (publish.yml) from pazz/alot.
# Release by publishing a GitHub release for a version tag; setuptools-scm
# takes the version from that tag.

on:
release:
types: [published]

permissions:
contents: read

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false

- name: Build sdist and wheel
run: |
python3 -m pip install build
python3 -m build

- name: Check the version is the release tag
env:
TAG: ${{ github.ref_name }}
run: test -f "dist/alot-${TAG#v}.tar.gz"

- uses: actions/upload-artifact@v7
with:
name: dist
path: dist/

publish:
needs: build
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v8
with:
name: dist
path: dist/

- uses: pypa/gh-action-pypi-publish@release/v1
21 changes: 19 additions & 2 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,33 @@ A full list of dependencies is below:

On Debian/Ubuntu these are packaged as::

python3-setuptools python3-magic python3-configobj python3-notmuch python3-urwid python3-urwidtrees python3-gpg python3-dev swig
python3-setuptools python3-magic python3-configobj python3-notmuch2 python3-urwid python3-urwidtrees python3-gpg python3-dev swig

On Fedora/Redhat these are packaged as::

python-setuptools python-magic python-configobj python-notmuch python-urwid python-urwidtrees python-gpg
python-setuptools python-magic python-configobj python-notmuch2 python-urwid python-urwidtrees python-gpg

Distributions may package an older urwidtrees than alot needs; if so, install
urwidtrees from PyPI instead.


From version 0.13 on, releases are published on
`PyPI <https://pypi.org/project/alot/>`_.
The bindings for notmuch and gpg are compiled against the system libraries,
so take them from your distribution and install alot with
`pipx <https://pipx.pypa.io/>`_, letting it see the system packages.
On Debian/Ubuntu::

sudo apt install pipx python3-notmuch2 python3-gpg python3-magic
PIPX_DEFAULT_BACKEND=pip pipx install --system-site-packages alot

The other dependencies are then installed from PyPI if the system lacks
them or has too old a version.
(The backend setting matters only if `uv<https://docs.astral.sh/uv/>`_ is installed: in that case pipx then uses it instead of pip by default, and uv tries
to build gpg from source instead of using the system's bindings.)



To set up and install the latest development version::

git clone https://github.com/pazz/alot
Expand Down
Loading