Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] python: workaround distutils issue with binary extensions
@ 2012-02-14  9:32 Peter Korsgaard
  2012-02-14 10:03 ` Yegor Yefremov
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2012-02-14  9:32 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=40281284ad5ab41fea4058d57c130cbae0fb9d70
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

distutils adds -L$LIBDIR (/usr/lib), breaking build of binary extensions.
Seen with netifaces, but other extensions may be affected as well.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/python/python.mk |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/package/python/python.mk b/package/python/python.mk
index 78895d4..28e215c 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -131,6 +131,15 @@ PYTHON_MAKE_ENV = \
 	PYTHON_MODULES_INCLUDE=$(STAGING_DIR)/usr/include \
 	PYTHON_MODULES_LIB="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib"
 
+# python distutils adds -L$LIBDIR when linking binary extensions, causing
+# trouble for cross compilation
+define PYTHON_FIXUP_LIBDIR
+	$(SED) 's|^LIBDIR=.*|LIBDIR= $(STAGING_DIR)/usr/lib|' \
+	   $(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/config/Makefile
+endef
+
+PYTHON_POST_INSTALL_STAGING_HOOKS += PYTHON_FIXUP_LIBDIR
+
 #
 # Development files removal
 #

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-14 11:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-14  9:32 [Buildroot] [git commit] python: workaround distutils issue with binary extensions Peter Korsgaard
2012-02-14 10:03 ` Yegor Yefremov
2012-02-14 11:27   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox