Skip to content
Open
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
123 changes: 123 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0:

.templates_sha: &templates_sha aec7a6ce7bb38902c70641526f6611e27141784a

include:
- project: 'freedesktop/ci-templates'
ref: *templates_sha
file: '/templates/fedora.yml'
- project: 'freedesktop/ci-templates'
ref: *templates_sha
file: '/templates/ci-fairy.yml'


workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH

variables:
FDO_UPSTREAM_REPO: 'libevdev/python-libevdev'


stages:
- prep
- test
- deploy

.policy:
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
# cancel run when a newer version is pushed to the branch
interruptible: true
dependencies: []

.fedora:
extends:
- .policy
variables:
FDO_DISTRIBUTION_VERSION: 42
FDO_DISTRIBUTION_TAG: '2025-11-14.0'
FDO_DISTRIBUTION_PACKAGES: 'git python3 python3.9 python3.10 python3.11 python3-pytest python3-pytest-timeout libevdev virtme-ng qemu-img qemu-system-x86-core binutils file systemd-udev uv python3-hatchling'

#
# Verify that commit messages are as expected, etc.
#

check-commit:
extends:
- .fdo.ci-fairy
stage: prep
script:
- ci-fairy check-commits --junit-xml=results.xml
except:
- master@libevdev/python-libevdev
variables:
GIT_DEPTH: 100
artifacts:
reports:
junit: results.xml

container-prep:
extends:
- .fedora
- .fdo.container-build@fedora
stage: prep
variables:
GIT_STRATEGY: none

pre-commit-hooks:
extends:
- .fdo.ci-fairy
stage: prep
script:
- python3 -m venv venv
- source venv/bin/activate
- pip3 install pre-commit
- pre-commit run --all-files
- git diff --exit-code || (echo "ERROR - Code style errors found, please fix" && false)

pytest:
extends:
- .fedora
- .fdo.distribution-image@fedora
stage: test
tags:
- kvm
parallel:
matrix:
# We tests the ones most likely to break and the current default
- PYTHON_VERSION: ["3", "3.9", "3.10", "3.11"]
variables:
VNG_KERNEL: https://gitlab.freedesktop.org/api/v4/projects/libevdev%2Fhid-tools/packages/generic/kernel-x86_64/v6.14/bzImage
script:
- curl -LO $VNG_KERNEL
- export -p > .vngenv
- uv sync --python $PYTHON_VERSION
- uv add --dev pytest-timeout
- |
vng --exec "source $PWD/.vngenv; rm $PWD/.vngenv; uv run --python $PYTHON_VERSION pytest --verbose --junit-xml=results.xml --session-timeout=600" \
--run ./bzImage \
--user root \
--overlay-rwdir=$HOME \
--append HOME=$HOME \
--overlay-rwdir=$(pwd)
artifacts:
when: always
reports:
junit: results.xml

install:
extends:
- .fedora
- .fdo.distribution-image@fedora
stage: test
needs:
- container-prep
script:
- uv pip install --system .
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.5
hooks:
- id: ruff-check
- id: ruff-format
21 changes: 21 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/source/conf.py

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: doc/requirements.txt
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Source code
-----------

The source code of python-libevdev can be found at:
http://github.com/whot/python-libevdev
https://gitlab.freedesktop.org/libevdev/python-libevdev

License
-------
Expand All @@ -32,5 +32,5 @@ python-libevdev is licensed under the MIT license.
> and/or sell copies of the Software, and to permit persons to whom the
> Software is furnished to do so, subject to the following conditions: [...]

See the [COPYING](http://github.com/whot/python-libevdev/blob/master/COPYING)
See the [COPYING](https://gitlab.freedesktop.org/libevdev/python-libevdev/blob/master/COPYING)
file for the full license information.
33 changes: 33 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
python-libevdev (0.13.1-1) unstable; urgency=medium

* New upstream release, switching to pyproject (with hatchling) and
pytest.
* Drop “Rules-Requires-Root: no” since it’s now the default.

-- Stephen Kitt <[email protected]> Mon, 17 Nov 2025 19:14:13 +0100

python-libevdev (0.12-1) unstable; urgency=medium

* New upstream release, merging intersphinx-mapping.patch.
* Add “Built-Using” information to track the Sphinx version used to
build the documentation package.
* Standards-Version 4.7.2, no change required.

-- Stephen Kitt <[email protected]> Tue, 02 Sep 2025 18:58:35 +0200

python-libevdev (0.11-2) unstable; urgency=medium

* Fix the intersphinx mapping declaration. Closes: #1090147.
* Update debian/watch to handle recent GitLab changes.
* Standards-Version 4.7.0, no change required.

-- Stephen Kitt <[email protected]> Tue, 17 Dec 2024 13:42:01 +0100

python-libevdev (0.11-1) unstable; urgency=medium

* New upstream release.
* Track new upstream location.
* Standards-Version 4.6.2, no change required.

-- Stephen Kitt <[email protected]> Thu, 07 Mar 2024 13:07:44 +0100

python-libevdev (0.5-3) unstable; urgency=low

[ Debian Janitor ]
Expand Down
10 changes: 6 additions & 4 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ Priority: optional
Build-Depends: debhelper-compat (= 13),
dh-python,
libevdev-dev,
pybuild-plugin-pyproject,
python3-all,
python3-setuptools,
python3-hatchling,
python3-pytest,
python3-sphinx,
python3-sphinx-rtd-theme
Standards-Version: 4.5.1
Standards-Version: 4.7.2
Vcs-Browser: https://salsa.debian.org/debian/python-libevdev
Vcs-Git: https://salsa.debian.org/debian/python-libevdev.git
Homepage: https://github.com/whot/python-libevdev
Homepage: https://gitlab.freedesktop.org/libevdev/python-libevdev
Testsuite: autopkgtest-pkg-python
Rules-Requires-Root: no

Package: python3-libevdev
Architecture: all
Expand Down Expand Up @@ -42,6 +43,7 @@ Architecture: all
Section: doc
Depends: ${sphinxdoc:Depends},
${misc:Depends}
Built-Using: ${sphinxdoc:Built-Using}
Description: Python wrapper for libevdev (common documentation)
This is a Python wrapper around libevdev, a wrapper library for evdev
devices. It provides a simpler API around evdev and takes advantage
Expand Down
6 changes: 3 additions & 3 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: python-libevdev
Source: https://github.com/whot/python-libevdev
Source: https://gitlab.freedesktop.org/libevdev/python-libevdev

Files: *
Copyright: 2016-2018 Red Hat, Inc.
Copyright: 2016-2022 Red Hat, Inc.
License: MIT

Files: debian/*
Copyright: 2018 Stephen Kitt <[email protected]>
Copyright: 2018, 2020-2021, 2024-2025 Stephen Kitt <[email protected]>
License: MIT

License: MIT
Expand Down
5 changes: 5 additions & 0 deletions debian/gbp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Configuration file for git-buildpackage and friends

[DEFAULT]
pristine-tar = True
upstream-vcs-tag = %(version)s
8 changes: 4 additions & 4 deletions debian/upstream/metadata
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
Bug-Database: https://github.com/whot/python-libevdev/issues
Bug-Submit: https://github.com/whot/python-libevdev/issues/new
Repository: https://github.com/whot/python-libevdev.git
Repository-Browse: https://github.com/whot/python-libevdev
Bug-Database: https://gitlab.freedesktop.org/libevdev/python-libevdev/-/issues
Bug-Submit: https://gitlab.freedesktop.org/libevdev/python-libevdev/-/issues/new
Repository: https://gitlab.freedesktop.org/libevdev/python-libevdev.git
Repository-Browse: https://gitlab.freedesktop.org/libevdev/python-libevdev
6 changes: 3 additions & 3 deletions debian/watch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version=4

opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%python-libevdev-$1.tar.gz%" \
https://github.com/whot/python-libevdev/tags \
(?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate
opts="searchmode=plain" \
https://gitlab.freedesktop.org/libevdev/@PACKAGE@/tags?sort=updated_desc \
-/archive/[^/]+/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@
1 change: 1 addition & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sphinx-rtd-theme==1.3.0
Loading
Loading