summaryrefslogtreecommitdiff
path: root/dev-python/python-evdev/python-evdev-0.7.0-r1.ebuild
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2018-09-26 15:59:20 -0700
committerMichał Górny <mgorny@gentoo.org>2018-10-03 12:00:46 +0200
commit898c59b8f44218f5d42ed8c696fe424fcb424988 (patch)
tree4a22ce8813348ae9d4bee2d179ced3af9e91e595 /dev-python/python-evdev/python-evdev-0.7.0-r1.ebuild
parentbfcbb1335686e9fc08547d217c4e5e642da0150c (diff)
downloadgentoo-898c59b8f44218f5d42ed8c696fe424fcb424988.tar.gz
gentoo-898c59b8f44218f5d42ed8c696fe424fcb424988.tar.bz2
gentoo-898c59b8f44218f5d42ed8c696fe424fcb424988.zip
dev-python/python-evdev: specify header locations, EAPI 7
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
Diffstat (limited to 'dev-python/python-evdev/python-evdev-0.7.0-r1.ebuild')
-rw-r--r--dev-python/python-evdev/python-evdev-0.7.0-r1.ebuild24
1 files changed, 24 insertions, 0 deletions
diff --git a/dev-python/python-evdev/python-evdev-0.7.0-r1.ebuild b/dev-python/python-evdev/python-evdev-0.7.0-r1.ebuild
new file mode 100644
index 000000000000..8f45fd510f8f
--- /dev/null
+++ b/dev-python/python-evdev/python-evdev-0.7.0-r1.ebuild
@@ -0,0 +1,24 @@
+# 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
+}