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

* [Buildroot] [git commit] python: workaround distutils issue with binary extensions
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Yegor Yefremov @ 2012-02-14 10:03 UTC (permalink / raw)
  To: buildroot

Am 14.02.2012 10:32, schrieb Peter Korsgaard:
> 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.

I hope this talk will change the situation in the future: https://us.pycon.org/2012/schedule/presentation/11/.

I've tried to raise this issue in distutils mailing list, but no one answered: http://python.6.n6.nabble.com/RFC-real-cross-compiling-support-for-Distutils2-td4368968.html

Peter, have you tried to make the following python patches upstream?

python-2.7-100-optional-test-modules.patch
python-2.7-101-optional-pydoc.patch
python-2.7-102-optional-2to3.patch
python-2.7-103-optional-sqlite.patch
python-2.7-104-optional-tk.patch
python-2.7-105-optional-curses.patch
python-2.7-106-optional-expat.patch
python-2.7-107-optional-codecs-cjk.patch
python-2.7-108-optional-nis.patch
python-2.7-109-optional-unicodedata.patch
python-2.7-110-optional-db.patch
python-2.7-111-optional-ssl.patch
python-2.7-112-optional-bzip2.patch
python-2.7-113-optional-zlib.patch

Yegor

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

* [Buildroot] [git commit] python: workaround distutils issue with binary extensions
  2012-02-14 10:03 ` Yegor Yefremov
@ 2012-02-14 11:27   ` Peter Korsgaard
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2012-02-14 11:27 UTC (permalink / raw)
  To: buildroot

>>>>> "Yegor" == Yegor Yefremov <yegor_sub1@visionsystems.de> writes:

Hi,

 Yegor> I hope this talk will change the situation in the future: https://us.pycon.org/2012/schedule/presentation/11/.

Yes, let's hope so.

 Yegor> I've tried to raise this issue in distutils mailing list, but no
 Yegor> one answered:
 Yegor> http://python.6.n6.nabble.com/RFC-real-cross-compiling-support-for-Distutils2-td4368968.html

Thanks.

 Yegor> Peter, have you tried to make the following python patches upstream?

No, I haven't. I'm not the author of them (Thomas did - I think he based
them on patches in openwrt).

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[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