File project.diff of Package python-hidapi
--- python-hidapi.spec.orig
+++ python-hidapi.spec
@@ -38,20 +38,20 @@ BuildRequires: libgudev-1_0-devel
BuildRequires: libusb-1_0-devel
BuildRequires: python-rpm-macros
Requires: python-setuptools > 44.0
+
+BuildRequires: declarative-macros
+BuildSystem: pyproject
+BuildOption(prep): -n hidapi-%{version}
+
%python_subpackages
%description
A Cython interface to the hidapi from https://github.com/libusb/hidapi
-%prep
-%autosetup -p1 -n hidapi-%{version}
-
-%build
+%build -p
export CFLAGS="%{optflags}"
-%pyproject_wheel
-%install
-%pyproject_install
+%install -a
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%files %{python_files}