From: Asaf Kahlon <asafka7@gmail.com>
To: buildroot@buildroot.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Asaf Kahlon <asafka7@gmail.com>
Subject: [Buildroot] [PATCH 1/1] package/python-attrs: remove _next_gen.py on python2
Date: Thu, 23 Sep 2021 21:37:49 +0300 [thread overview]
Message-ID: <20210923183751.361386-1-asafka7@gmail.com> (raw)
The _next_gen.py file contains python 3.6+ API and it's not
useable with python 2.
In addition, this file is imported on __init__.py only after
checking the version of python is above 3.6, so we can safely
remove it.
Fixes:
- http://autobuild.buildroot.net/results/5774c6237b72b6f5e005bb5b229c078235ff2741/
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
---
package/python-attrs/python-attrs.mk | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/package/python-attrs/python-attrs.mk b/package/python-attrs/python-attrs.mk
index b99a98501c..f23cabd998 100644
--- a/package/python-attrs/python-attrs.mk
+++ b/package/python-attrs/python-attrs.mk
@@ -11,4 +11,13 @@ PYTHON_ATTRS_SETUP_TYPE = setuptools
PYTHON_ATTRS_LICENSE = MIT
PYTHON_ATTRS_LICENSE_FILES = LICENSE
+# _next_gen is usable only on python 3.6+ and it's not imported
+# on __init__.py in case lower version of python is used.
+ifeq ($(BR2_PACKAGE_PYTHON),y)
+define PYTHON_ATTRS_REMOVE_NEXT_GEN
+ $(RM) $(@D)/src/attr/_next_gen.py
+endef
+PYTHON_ATTRS_POST_PATCH_HOOKS += PYTHON_ATTRS_REMOVE_NEXT_GEN
+endif
+
$(eval $(python-package))
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2021-09-23 18:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-23 18:37 Asaf Kahlon [this message]
2021-09-23 18:37 ` [Buildroot] [PATCH 1/1] package/python-packaging: depend on python3 Asaf Kahlon
2021-10-03 19:31 ` Yann E. MORIN
2021-09-23 19:39 ` [Buildroot] [PATCH 1/1] package/python-attrs: remove _next_gen.py on python2 Arnout Vandecappelle
2021-09-23 20:54 ` Romain Naour
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=20210923183751.361386-1-asafka7@gmail.com \
--to=asafka7@gmail.com \
--cc=buildroot@buildroot.org \
--cc=thomas.petazzoni@bootlin.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.