3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
7 Summary: Python bindings for the Linux input subsystem
12 Group: Libraries/Python
13 Source0: https://files.pythonhosted.org/packages/source/e/evdev/%{module}-%{version}.tar.gz
14 # Source0-md5: 3fc7c0d0fcd3382fdd3a1a52f1017023
15 URL: https://github.com/gvalkov/python-evdev
16 BuildRequires: rpm-pythonprov
17 BuildRequires: rpmbuild(macros) >= 1.714
19 BuildRequires: python-devel
20 BuildRequires: python-setuptools
23 BuildRequires: python3-devel
24 BuildRequires: python3-setuptools
26 Requires: python-modules
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 This package provides bindings to the generic input event interface in
31 Linux. The evdev interface serves the purpose of passing events
32 generated in the kernel directly to userspace through character
33 devices that are typically located in /dev/input/.
35 This package also comes with bindings to uinput, the userspace input
36 subsystem. Uinput allows userspace programs to create and handle input
37 devices that can inject events directly into the input subsystem.
39 %package -n python3-%{module}
40 Summary: Python bindings for the Linux input subsystem
41 Group: Libraries/Python
42 Requires: python3-modules
44 %description -n python3-%{module}
45 This package provides bindings to the generic input event interface in
46 Linux. The evdev interface serves the purpose of passing events
47 generated in the kernel directly to userspace through character
48 devices that are typically located in /dev/input/.
50 This package also comes with bindings to uinput, the userspace input
51 subsystem. Uinput allows userspace programs to create and handle input
52 devices that can inject events directly into the input subsystem.
55 %setup -q -n %{module}-%{version}
59 %py_build %{?with_tests:test}
63 %py3_build %{?with_tests:test}
67 rm -rf $RPM_BUILD_ROOT
78 rm -rf $RPM_BUILD_ROOT
82 %defattr(644,root,root,755)
84 %dir %{py_sitedir}/%{module}
85 %{py_sitedir}/%{module}/*.py[co]
86 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
87 %{py_sitedir}/%{module}-%{version}-py*.egg-info
91 %files -n python3-%{module}
92 %defattr(644,root,root,755)
94 %dir %{py3_sitedir}/%{module}
95 %{py3_sitedir}/%{module}/*.py
96 %attr(755,root,root) %{py3_sitedir}/%{module}/*.so
97 %{py3_sitedir}/%{module}/__pycache__
98 %{py3_sitedir}/%{module}-%{version}-py*.egg-info