]> git.pld-linux.org Git - packages/python-evdev.git/blob - python-evdev.spec
e7bd817392856cf5e7130efdc3cf00c6cad40eea
[packages/python-evdev.git] / python-evdev.spec
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
7 Summary:        Python bindings for the Linux input subsystem
8 Name:           python-%{module}
9 Version:        1.0.0
10 Release:        4
11 License:        BSD
12 Group:          Libraries/Python
13 Source0:        https://files.pythonhosted.org/packages/source/e/evdev/%{module}-%{version}.tar.gz
14 # Source0-md5:  1c9830c5a87ef5147cabfadfefc91a20
15 URL:            https://github.com/gvalkov/python-evdev
16 BuildRequires:  rpm-pythonprov
17 BuildRequires:  rpmbuild(macros) >= 1.714
18 %if %{with python2}
19 BuildRequires:  python-devel
20 BuildRequires:  python-setuptools
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-devel
24 BuildRequires:  python3-setuptools
25 %endif
26 Requires:       python-modules
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
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/.
34
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.
38
39 %package -n python3-%{module}
40 Summary:        Python bindings for the Linux input subsystem
41 Group:          Libraries/Python
42 Requires:       python3-modules
43
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/.
49
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.
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
67 rm -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
78 rm -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.088258 seconds and 2 git commands to generate.