From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] Fix PYC-only installation for Python3
Date: Sun, 27 Jan 2013 23:42:55 +0100 [thread overview]
Message-ID: <5105AD6F.4070105@mind.be> (raw)
In-Reply-To: <1359313382-2257-1-git-send-email-daniel@sigpwr.com>
On 27/01/13 20:03, Daniel Nelson wrote:
> All,
>
> This is my first buildroot/open source submission. I'd appreciate some feedback.
>
> Python3 changes the behavior of .pyc caching, breaking the PYC-only option in buildroot. The details are inhttp://www.python.org/dev/peps/pep-3147
>
> I've added a configure flag to Python3, and corresponding logic in buildroot.
Hasn't this been fixed in git 6ffab129 ?
Regards,
Arnout
commit 6ffab129a3ebc76caf7ae40caf1f6b0185f3e114
Author: Maxime Ripard <maxime.ripard@free-electrons.com>
Date: Fri Jan 18 04:06:14 2013 +0000
python3: Handle properly the pyc and py files on the target
Fixes #5690
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index 0d54162..e7c0983 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -155,5 +155,27 @@ endef
ifneq ($(BR2_PACKAGE_PYTHON),y)
PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_INSTALL_SYMLINK
endif
+
+ifeq ($(BR2_PACKAGE_PYTHON3_PY_ONLY),y)
+define PYTHON3_REMOVE_MODULES_FILES
+ for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) \
+ -name __pycache__` ; do \
+ rm -rf $$i ; \
+ done
+endef
+endif
+
+ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY),y)
+define PYTHON3_REMOVE_MODULES_FILES
+ for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) \
+ -name *.py` ; do \
+ rm -f $$i ; \
+ done
+endef
+endif
+
+PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_REMOVE_MODULES_FILES
+
+
$(eval $(autotools-package))
$(eval $(host-autotools-package))
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
next prev parent reply other threads:[~2013-01-27 22:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-27 19:03 [Buildroot] [PATCH] Fix PYC-only installation for Python3 Daniel Nelson
2013-01-27 22:42 ` Arnout Vandecappelle [this message]
2013-01-27 22:52 ` Daniel N
2013-01-27 23:15 ` Arnout Vandecappelle
2013-01-27 23:36 ` Arnout Vandecappelle
2013-01-27 23:43 ` Daniel N
2013-01-27 23:49 ` Arnout Vandecappelle
2013-01-28 1:38 ` [Buildroot] [PATCHv2] python3: Fix pyc-only related runtime exceptions Daniel Nelson
2013-01-28 21:04 ` Peter Korsgaard
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=5105AD6F.4070105@mind.be \
--to=arnout@mind.be \
--cc=buildroot@busybox.net \
/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