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
41 changes: 8 additions & 33 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,52 +12,27 @@ jobs:
fail-fast: true
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
cython-version: ["0.29", "3"]
os: [ubuntu-24.04]
exclude:
- python-version: "3.13"
cython-version: "0.29"
- python-version: "3.14"
cython-version: "0.29"

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
python-version: ${{ matrix.python-version }}

- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libattr1-dev libfuse3-dev fuse3
sudo apt-get install -y pkg-config gcc ninja-build meson

- name: Install Python dependencies (misc)
run: pip install setuptools trio pytest pytest_trio mypy sphinx

- name: Install Python dependencies (Cython 0.29)
if: ${{ matrix.cython-version == '0.29' }}
run: pip install "Cython<3"

- name: Install Python dependencies (Cython 3.x)
if: ${{ matrix.cython-version == '3' }}
run: pip install "Cython>=3"
sudo apt-get install -y libattr1-dev libfuse3-dev fuse3 pkg-config gcc

- name: Build
run: |
# Disable developer mode, so that build does not suddenly break if
# e.g. a newer compiler version results in new warning messages.
rm MANIFEST.in
python setup.py build_cython
python setup.py build_ext --inplace

- name: Test
run: pytest -v -rs test/
run: uv sync --locked

- name: Typecheck
run: mypy
- name: Run tests
run: uv run pytest -v -rs test/

- name: Build docs
run: sphinx-build -b html rst doc/html
run: uv run sphinx-build -b html rst doc/html
7 changes: 7 additions & 0 deletions Changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

.. currentmodule:: pyfuse3

Unreleased Changes
==================

* Removed the `pyfuse3_asyncio` module. This has been renamed to
`pyfuse3.asyncio` for quite some time.


Release 3.4.1 (2025-12-22)
==========================

Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ graft rst
graft util
graft test
prune test/.cache
prune .github
exclude MANIFEST.in
exclude .git*
exclude .readthedocs.yaml
recursive-include src *.pyx *.pyi *.py *.pxi *.pxd *.c *.h
global-exclude *.pyc
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Getting Help

Please report any bugs on the `issue tracker`_. For discussion and
questions, please use the general `FUSE mailing list`_ or
`GitHub Discussions <https://github.com/libfuse/pyfuse3/discussions>`
`GitHub Discussions <https://github.com/libfuse/pyfuse3/discussions>`_.

Development Status
------------------
Expand All @@ -47,7 +47,7 @@ The pyfuse3 source code is available on GitHub_.


.. __: https://pyfuse3.readthedocs.io/
.. _libfuse 3: http://github.com/libfuse/libfuse
.. _`libfuse 3`: http://github.com/libfuse/libfuse
.. _FUSE mailing list: https://lists.sourceforge.net/lists/listinfo/fuse-devel
.. _issue tracker: https://github.com/libfuse/pyfuse3/issues
.. _mailing list archive: http://dir.gmane.org/gmane.comp.file-systems.fuse.devel
Expand Down
26 changes: 10 additions & 16 deletions developer-notes/release_process.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
Steps for Releasing a New Version
---------------------------------

* pip install twine sphinx
* pip install -U Cython # important: use latest/best Cython!
* Bump version in `setup.py` and version/release in `rst/conf.py`
* Add release date to `Changes.rst`
* `./setup.py build_cython`
* `./setup.py sdist`
* Extract tarball in temporary directory,
* `python3 setup.py build_ext --inplace && python3 -m pytest test`
* Run tests under valgrind. Build python `--with-valgrind --with-pydebug`, then `valgrind --trace-children=yes "--trace-children-skip=*mount*" python-dbg -m pytest test/`
* `sphinx-build -b html rst doc/html`
* `./setup.py build_ext --inplace`
* `./setup.py sdist`
* Git commit / tag & sign
* `util/sdist-sign 1.2.3`
* `util/upload-pypi 1.2.3`
* `export NEWVER=vXX.YY.Z`
* Add release date and version to `Changes.rst`
* `git commit --all -m "Released $NEWVER"`
* `git tag v$NEWVER`
* `uv sync --locked` (also installs twine, sphinx, Cython)
* `uv run sphinx-build -b html rst doc/html`
* `uv build --sdist` (or `python3 -m build --sdist`)
* `util/sdist-sign $NEWVER`
* `util/upload-pypi $NEWVER`
* Send announcement to mailing list
* Get contributors: `git log --pretty="format:%an <%aE>" "${PREV_TAG}..${TAG}" | sort -u`
* Get contributors: `git log --pretty="format:%an <%aE>" "${PREV_TAG}..v${NEWVER}" | sort -u`


Announcement template:
Expand Down
28 changes: 28 additions & 0 deletions developer-notes/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# How to run/develop pyfuse3 from Git

To run unit tests, build the documentation, and make changes to pyfuse3, the recommended procedure is
to create a virtual environment and install pyfuse3, build dependencies, and development tools into
this environment.

You can do this using a tool like [uv](https://docs.astral.sh/uv/getting-started/installation/) or
by hand as follows:

```sh
$ python3 -m venv .venv # create the venv
$ . .venv/bin/activate # activate it
$ pip install --upgrade pip # upgrade pip
$ pip install .[dev] # install build dependencies
$ pip install --no-build-isolation --editable . # install pyfuse3 in editable mode
```

As long as the venv is active, you can run tests with

```sh
$ pytest test/
```

and build the HTML documentation and manpages with:
```sh
$ sphinx-build -b html rst doc/html
```

4 changes: 4 additions & 0 deletions developer-notes/valgrind.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
To run tests under valgrind:

- Build python `--with-valgrind --with-pydebug`.
- Run `valgrind --trace-children=yes "--trace-children-skip=*mount*" python-dbg -m pytest test/`
61 changes: 52 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,53 @@
[build-system]
requires = ["setuptools >= 78.1.1"]
build-backend = "setuptools.build_meta"

[tool.mypy]
mypy_path = ["$MYPY_CONFIG_FILE_DIR/src"]
packages = ["pyfuse3"]
modules = ["_pyfuse3", "pyfuse3_asyncio"]
namespace_packages = false
strict = true
requires = ["setuptools>=78.1.1", "setuptools_scm>=8.0", "Cython"]
build-backend = "build_backend"
backend-path = ["util"]

[project]
name = "pyfuse3"
dynamic = ["version"]
description = "Python 3 bindings for libfuse 3 with async I/O support"
readme = "README.rst"
requires-python = ">=3.10"
license = "LGPL-2.1-or-later"
authors = [
{name = "Nikolaus Rath", email = "Nikolaus@rath.org"}
]
keywords = ["FUSE", "python"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Filesystems",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: BSD :: FreeBSD",
"Typing :: Typed",
]
dependencies = [
"trio >= 0.15",
]

[project.urls]
Homepage = "https://github.com/libfuse/pyfuse3"

[dependency-groups]
dev = [
"pytest >= 3.4.0",
"pytest-trio",
"sphinx",
"twine",
]

[tool.setuptools_scm]

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
pyfuse3 = ["py.typed"]

1 change: 0 additions & 1 deletion requirements.d/rtd.txt

This file was deleted.

7 changes: 3 additions & 4 deletions rst/asyncio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
=================

By default, pyfuse3 uses asynchronous I/O using Trio_ (and most of the
documentation assumes that you are using Trio). If you'd rather use
asyncio, import the *pyfuse3.asyncio* module (*pyfuse3_asyncio* in 3.3.0 and
earlier) and call its *enable()* function before using *pyfuse3*.
For example::
documentation assumes that you are using Trio). If you'd rather use asyncio,
import the *pyfuse3.asyncio* module and call its *enable()* function before
using *pyfuse3*. For example::

import pyfuse3
import pyfuse3.asyncio
Expand Down
9 changes: 7 additions & 2 deletions rst/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,14 @@
# built documents.
#
# The short X.Y version.
version = '3.4.1'
try:
from importlib.metadata import version
version = version('pyfuse3')
except Exception:
# Fallback version if package is not installed
version = 'dev'
# The full version, including alpha/beta/rc tags.
release = version + ''
release = version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
51 changes: 13 additions & 38 deletions rst/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,35 @@
Dependencies
============

In order to build and run pyfuse3 you need the following software:
As usual, Python dependencies are specified in :file:`pyproject.toml`. However, to build pyfuse3 you
also need the following additional dependencies installed on your system:

* Linux kernel 3.9 or newer.
* Version 3.3.0 or newer of the libfuse_ library, including development
* libfuse_, version 3.3.0 or newer, including development
headers (typically distributions provide them in a *libfuse3-devel*
or *libfuse3-dev* package).
* Python_ 3.8 or newer installed with development headers
* The Trio_ Python module, version 0.7 or newer.
* The `setuptools`_ Python module, version 1.0 or newer.
* the `pkg-config`_ tool
* the `attr`_ library
* A C compiler (only for building)

To run the unit tests, you will need

* The `py.test`_ Python module, version 3.3.0 or newer
* Python development headers (for example, the *python3-dev* or
*python3-devel* package on many Linux distributions)
* A C compiler


Stable releases
===============

To install a stable pyfuse3 release:

1. Download and unpack the release tarball from https://pypi.python.org/pypi/pyfuse3/
2. Run ``python3 setup.py build_ext --inplace`` to build the C extension
3. Run ``python3 -m pytest test/`` to run a self-test. If this fails, ask
for help on the `FUSE mailing list`_ or report a bug in the
`issue tracker <https://bitbucket.org/nikratio/python-pyfuse3/issues>`_.
4. To install system-wide for all users, run ``sudo python setup.py
install``. To install into :file:`~/.local`, run ``python3
setup.py install --user``.
To install a stable pyfuse3 release, ensure you have the non-Python dependencies
installed and then use your favorite Python package manager to install pyfuse3 from
PyPI (e.g. ``pip install pyfuse3``).


Development Version
===================
Installing from Git / Developing pyfuse3
========================================

If you have checked out the unstable development version, a bit more
effort is required. You need to also have Cython_ (0.29 or newer) and
Sphinx_ installed, and the necessary commands are::
Clone the pyfuse3_ repository and take a look at :file:`developer_notes/setup.md`.

python3 setup.py build_cython
python3 setup.py build_ext --inplace
python3 -m pytest test/
sphinx-build -b html rst doc/html
python3 setup.py install


.. _Cython: http://www.cython.org/
.. _Sphinx: http://sphinx.pocoo.org/
.. _Python: http://www.python.org/
.. _Trio: https://github.com/python-trio/trio
.. _FUSE mailing list: https://lists.sourceforge.net/lists/listinfo/fuse-devel
.. _`py.test`: https://pypi.python.org/pypi/pytest/
.. _libfuse: http://github.com/libfuse/libfuse
.. _attr: http://savannah.nongnu.org/projects/attr/
.. _`pkg-config`: http://www.freedesktop.org/wiki/Software/pkg-config
.. _setuptools: https://pypi.python.org/pypi/setuptools
.. _pyfuse3: https://github.com/libfuse/pyfuse3/
5 changes: 0 additions & 5 deletions setup.cfg

This file was deleted.

Loading