Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/python-evdev/
Date: Wed, 03 Oct 2018 10:01:01
Message-Id: 1538560846.898c59b8f44218f5d42ed8c696fe424fcb424988.mgorny@gentoo
1 commit: 898c59b8f44218f5d42ed8c696fe424fcb424988
2 Author: Brian Norris <briannorris <AT> chromium <DOT> org>
3 AuthorDate: Wed Sep 26 22:59:20 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 3 10:00:46 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=898c59b8
7
8 dev-python/python-evdev: specify header locations, EAPI 7
9
10 setup.py hardcodes /usr/include/linux/... paths. This doesn't work if
11 cross-compiling or otherwise using a different $ROOT with a different
12 set of headers, as the setup stage might pick up one set of headers,
13 while the compilation might pick up another.
14
15 Fortunately, setup.py supports an --evdev-headers arg so we can fix
16 this. Let's use it.
17
18 At the same time, bump to EAPI 7 to support ${SYSROOT}.
19
20 Tested with pytest -- 1 existing test_uinput.py (test_abs_values())
21 failed before and after this change.
22
23 Signed-off-by: Brian Norris <briannorris <AT> chromium.org>
24 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
25 Closes: https://github.com/gentoo/gentoo/pull/9978
26
27 .../{python-evdev-0.7.0.ebuild => python-evdev-0.7.0-r1.ebuild} | 8 +++++++-
28 1 file changed, 7 insertions(+), 1 deletion(-)
29
30 diff --git a/dev-python/python-evdev/python-evdev-0.7.0.ebuild b/dev-python/python-evdev/python-evdev-0.7.0-r1.ebuild
31 similarity index 71%
32 rename from dev-python/python-evdev/python-evdev-0.7.0.ebuild
33 rename to dev-python/python-evdev/python-evdev-0.7.0-r1.ebuild
34 index 4a7a95efeda..8f45fd510f8 100644
35 --- a/dev-python/python-evdev/python-evdev-0.7.0.ebuild
36 +++ b/dev-python/python-evdev/python-evdev-0.7.0-r1.ebuild
37 @@ -1,7 +1,7 @@
38 # Copyright 1999-2017 Gentoo Foundation
39 # Distributed under the terms of the GNU General Public License v2
40
41 -EAPI=6
42 +EAPI=7
43 PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
44
45 inherit distutils-r1
46 @@ -16,3 +16,9 @@ KEYWORDS="~amd64 ~arm ~x86"
47 IUSE=""
48
49 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
50 +
51 +python_compile() {
52 + distutils-r1_python_compile build_ecodes \
53 + --evdev-headers \
54 + "${SYSROOT}"/usr/include/linux/input.h:"${SYSROOT}"/usr/include/linux/input-event-codes.h
55 +}