public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/python-evdev/
Date: Wed,  3 Oct 2018 10:00:54 +0000 (UTC)	[thread overview]
Message-ID: <1538560846.898c59b8f44218f5d42ed8c696fe424fcb424988.mgorny@gentoo> (raw)

commit:     898c59b8f44218f5d42ed8c696fe424fcb424988
Author:     Brian Norris <briannorris <AT> chromium <DOT> org>
AuthorDate: Wed Sep 26 22:59:20 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Oct  3 10:00:46 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=898c59b8

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 <AT> chromium.org>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/9978

 .../{python-evdev-0.7.0.ebuild => python-evdev-0.7.0-r1.ebuild}   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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
similarity index 71%
rename from dev-python/python-evdev/python-evdev-0.7.0.ebuild
rename to dev-python/python-evdev/python-evdev-0.7.0-r1.ebuild
index 4a7a95efeda..8f45fd510f8 100644
--- a/dev-python/python-evdev/python-evdev-0.7.0.ebuild
+++ b/dev-python/python-evdev/python-evdev-0.7.0-r1.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
 
 inherit distutils-r1
@@ -16,3 +16,9 @@ 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
+}


             reply	other threads:[~2018-10-03 10:01 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 10:00 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-02-19  4:10 [gentoo-commits] repo/gentoo:master commit in: dev-python/python-evdev/ Michał Górny
2023-11-24 11:48 Andrew Ammerlaan
2023-10-03 17:18 Mart Raudsepp
2023-06-21 13:39 Andrew Ammerlaan
2023-06-21 13:39 Andrew Ammerlaan
2023-05-04 16:30 Michał Górny
2022-08-18 10:17 Michał Górny
2022-08-18  7:01 Agostino Sarubbo
2022-08-17 21:13 Sam James
2022-07-18  7:54 Michał Górny
2022-07-17  5:41 Michał Górny
2022-06-06 11:02 Jakov Smolić
2022-06-05  5:46 Michał Górny
2022-04-27  7:00 Michał Górny
2022-04-26 23:24 Sam James
2022-03-24 10:20 Michał Górny
2021-05-25 16:05 Michał Górny
2021-02-19 16:37 Michał Górny
2021-02-19 12:07 Sam James
2021-01-17  9:02 Michał Górny
2020-12-11 15:08 Michał Górny
2020-11-01 21:41 James Le Cuirot
2020-09-18  7:29 Agostino Sarubbo
2020-06-15  2:30 Aaron Bauman
2020-05-12 13:58 Joonas Niilola
2020-05-12 13:58 Joonas Niilola
2020-02-05 20:47 Michał Górny
2019-03-01 13:19 Lars Wendler
2019-01-27 12:36 Pacho Ramos
2018-10-12 15:31 Dennis Lamm
2017-12-21  9:07 Michael Palimaka
2017-11-20 16:13 Manuel Rüger
2017-11-20 16:13 Manuel Rüger
2017-05-15 12:33 Manuel Rüger
2016-09-11 15:47 Sebastian Pipping

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1538560846.898c59b8f44218f5d42ed8c696fe424fcb424988.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox