diff --git a/libevdev-0.12.tar.gz b/libevdev-0.12.tar.gz deleted file mode 100644 index 4cb000be8832e17e79da8564ea1b4520112bc9d9..0000000000000000000000000000000000000000 Binary files a/libevdev-0.12.tar.gz and /dev/null differ diff --git a/libevdev-0.13.1.tar.gz b/libevdev-0.13.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..20507622ce41af8749e334d420f071f5a8637b8f Binary files /dev/null and b/libevdev-0.13.1.tar.gz differ diff --git a/python-libevdev.spec b/python-libevdev.spec index 798bf2014c0ada7deda8aa8a1dcf4b33b14a5834..7af19d906d5d57ce32fa94153835b14f21b3d572 100644 --- a/python-libevdev.spec +++ b/python-libevdev.spec @@ -1,13 +1,22 @@ %global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-libevdev -Version: 0.12 +Version: 0.13.1 Release: 1 Summary: Python wrapper for libevdev License: MIT URL: https://gitlab.freedesktop.org/libevdev/python-libevdev -Source0: https://files.pythonhosted.org/packages/61/6b/e0193f4ba0c3b7d20f8f1b961793d39df5538451c0959abb115020d4ec2d/libevdev-0.12.tar.gz +Source0: https://files.pythonhosted.org/packages/source/l/libevdev/libevdev-%{version}.tar.gz BuildArch: noarch +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-build +BuildRequires: python3-hatchling +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr + %description python-libevdev is a Python wrapper around the libevdev C library. It provides a Pythonic API to read events from the Linux kernel's input device @@ -16,9 +25,6 @@ nodes and to read and/or modify the device's state and capabilities. %package -n python3-libevdev Summary: Python wrapper for libevdev Provides: python-libevdev -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pbr %description -n python3-libevdev python-libevdev is a Python wrapper around the libevdev C library. It @@ -37,11 +43,29 @@ nodes and to read and/or modify the device's state and capabilities. %prep %autosetup -n libevdev-0.12 +# Fix setuptools_scm version issue +if [ -f pyproject.toml ]; then + sed -i '/^version *=/d' pyproject.toml + sed -i '/^\[project\]/a version = "%{version}"' pyproject.toml + sed -i '/dynamic *= *\[.*version.*\]/d' pyproject.toml + if grep -q '^\[tool\.setuptools_scm\]' pyproject.toml; then + sed -i '/^\[tool\.setuptools_scm\]/,/^\[/ {/^write_to *=/d}' pyproject.toml + sed -i '/^\[tool\.setuptools_scm\]/a fallback_version = "%{version}"' pyproject.toml + fi +fi + %build -%py3_build +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" +%pyproject_build %install -%py3_install +export PYTHONDONTWRITEBYTECODE=1 + +# Clean __pycache__ directories and .pyc/.pyo files +find %{buildroot} -name '*.py[co]' -delete +find %{buildroot} -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" +%pyproject_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi @@ -75,6 +99,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Mon Dec 01 2025 zhangzeyang0718 - 0.13.1-1 +- Update package to version 0.13.1 + * Fri Nov 7 2025 Hann - 0.12-1 - Update to 0.12 - Fix intersphinx mapping