mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-02-17 04:07:27 -08:00
setup.py hardcodes /usr/include/linux/... paths. This doesn't work if
cross-compiling or otherwise using a different $ROOT with a different
set of headers, as the setup stage might pick up one set of headers,
while the compilation might pick up another.
Fortunately, setup.py supports an --evdev-headers arg so we can fix
this. Let's use it.
At the same time, bump to EAPI 7 to support ${SYSROOT}.
Tested with pytest -- 1 existing test_uinput.py (test_abs_values())
failed before and after this change.
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/9978
25 lines
645 B
Bash
25 lines
645 B
Bash
# Copyright 1999-2017 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=7
|
|
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
|
|
|
inherit distutils-r1
|
|
|
|
DESCRIPTION="Python library for evdev bindings"
|
|
HOMEPAGE="https://python-evdev.readthedocs.org/"
|
|
SRC_URI="https://github.com/gvalkov/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
|
|
LICENSE="BSD"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~arm ~x86"
|
|
IUSE=""
|
|
|
|
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
|
|
|
|
python_compile() {
|
|
distutils-r1_python_compile build_ecodes \
|
|
--evdev-headers \
|
|
"${SYSROOT}"/usr/include/linux/input.h:"${SYSROOT}"/usr/include/linux/input-event-codes.h
|
|
}
|