]> git.pld-linux.org Git - packages/python-evdev.git/blame - python-evdev.spec
rebuild with tests and docs
[packages/python-evdev.git] / python-evdev.spec
CommitLineData
d9159661
JK
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
6%define module evdev
7Summary: Python bindings for the Linux input subsystem
8Name: python-%{module}
7f323273 9Version: 1.5.0
27ad70cc 10Release: 2
d9159661
JK
11License: BSD
12Group: Libraries/Python
13Source0: https://files.pythonhosted.org/packages/source/e/evdev/%{module}-%{version}.tar.gz
7f323273 14# Source0-md5: 3fc7c0d0fcd3382fdd3a1a52f1017023
d9159661
JK
15URL: https://github.com/gvalkov/python-evdev
16BuildRequires: rpm-pythonprov
17BuildRequires: rpmbuild(macros) >= 1.714
18%if %{with python2}
19BuildRequires: python-devel
20BuildRequires: python-setuptools
21%endif
22%if %{with python3}
23BuildRequires: python3-devel
24BuildRequires: python3-setuptools
25%endif
26Requires: python-modules
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30This package provides bindings to the generic input event interface in
31Linux. The evdev interface serves the purpose of passing events
32generated in the kernel directly to userspace through character
33devices that are typically located in /dev/input/.
34
35This package also comes with bindings to uinput, the userspace input
36subsystem. Uinput allows userspace programs to create and handle input
37devices that can inject events directly into the input subsystem.
38
39%package -n python3-%{module}
40Summary: Python bindings for the Linux input subsystem
41Group: Libraries/Python
42Requires: python3-modules
43
44%description -n python3-%{module}
45This package provides bindings to the generic input event interface in
46Linux. The evdev interface serves the purpose of passing events
47generated in the kernel directly to userspace through character
48devices that are typically located in /dev/input/.
49
50This package also comes with bindings to uinput, the userspace input
51subsystem. Uinput allows userspace programs to create and handle input
52devices that can inject events directly into the input subsystem.
53
54%prep
55%setup -q -n %{module}-%{version}
56
57%build
58%if %{with python2}
59%py_build %{?with_tests:test}
60%endif
61
62%if %{with python3}
63%py3_build %{?with_tests:test}
64%endif
65
66%install
67rm -rf $RPM_BUILD_ROOT
68%if %{with python2}
69%py_install
70%py_postclean
71%endif
72
73%if %{with python3}
74%py3_install
75%endif
76
77%clean
78rm -rf $RPM_BUILD_ROOT
79
80%if %{with python2}
81%files
82%defattr(644,root,root,755)
83%doc README.rst
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
88%endif
89
90%if %{with python3}
91%files -n python3-%{module}
92%defattr(644,root,root,755)
93%doc README.rst
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
99%endif
This page took 0.139094 seconds and 4 git commands to generate.