* [Buildroot] [PATCH v5 0/6] Python related changes
@ 2012-01-04 11:29 yegorslists at googlemail.com
2012-01-04 11:30 ` [Buildroot] [PATCH v5 1/6] Python: add external modules option yegorslists at googlemail.com
` (5 more replies)
0 siblings, 6 replies; 18+ messages in thread
From: yegorslists at googlemail.com @ 2012-01-04 11:29 UTC (permalink / raw)
To: buildroot
1. add infrastructure for external python packages
2. enable zlib support for host-python due to setuptools and others dependencies
3. add some external packages
4. add distutilscross for cross-compiling python extensions
5. fix netifaces cross-compilation issue
Yegor
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 1/6] Python: add external modules option
2012-01-04 11:29 [Buildroot] [PATCH v5 0/6] Python related changes yegorslists at googlemail.com
@ 2012-01-04 11:30 ` yegorslists at googlemail.com
2012-01-07 19:54 ` Peter Korsgaard
2012-01-04 11:30 ` [Buildroot] [PATCH v5 2/6] Python: enable zlib support for the host package yegorslists at googlemail.com
` (4 subsequent siblings)
5 siblings, 1 reply; 18+ messages in thread
From: yegorslists at googlemail.com @ 2012-01-04 11:30 UTC (permalink / raw)
To: buildroot
From: Yegor Yefremov <yegorslists@googlemail.com>
all external python packages/libraries should reside in
"external python modules" section.
Move existing modules python-serial and python-mad there
Move python-mad from package/multimedia to package
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
package/Config.in | 7 ++++-
package/multimedia/Config.in | 1 -
package/multimedia/python-mad/Config.in | 9 ------
package/multimedia/python-mad/python-mad.mk | 41 ---------------------------
package/python-mad/Config.in | 9 ++++++
package/python-mad/python-mad.mk | 41 +++++++++++++++++++++++++++
6 files changed, 56 insertions(+), 52 deletions(-)
delete mode 100644 package/multimedia/python-mad/Config.in
delete mode 100644 package/multimedia/python-mad/python-mad.mk
create mode 100644 package/python-mad/Config.in
create mode 100644 package/python-mad/python-mad.mk
diff --git a/package/Config.in b/package/Config.in
index eb93b1c..6ab893f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -236,6 +236,12 @@ endif
source "package/microperl/Config.in"
source "package/php/Config.in"
source "package/python/Config.in"
+if BR2_PACKAGE_PYTHON
+menu "external python modules"
+source "package/python-mad/Config.in"
+source "package/python-serial/Config.in"
+endmenu
+endif
source "package/ruby/Config.in"
source "package/tcl/Config.in"
endmenu
@@ -312,7 +318,6 @@ source "package/libhid/Config.in"
source "package/libiqrf/Config.in"
source "package/libusb/Config.in"
source "package/libusb-compat/Config.in"
-source "package/python-serial/Config.in"
endmenu
if BROKEN
diff --git a/package/multimedia/Config.in b/package/multimedia/Config.in
index d50e4fc..a05d1d9 100644
--- a/package/multimedia/Config.in
+++ b/package/multimedia/Config.in
@@ -40,7 +40,6 @@ source "package/multimedia/mplayer/Config.in"
source "package/multimedia/musepack/Config.in"
source "package/multimedia/portaudio/Config.in"
source "package/multimedia/pulseaudio/Config.in"
-source "package/multimedia/python-mad/Config.in"
source "package/multimedia/speex/Config.in"
source "package/multimedia/tidsp-binaries/Config.in"
source "package/multimedia/taglib/Config.in"
diff --git a/package/multimedia/python-mad/Config.in b/package/multimedia/python-mad/Config.in
deleted file mode 100644
index 2535421..0000000
--- a/package/multimedia/python-mad/Config.in
+++ /dev/null
@@ -1,9 +0,0 @@
-config BR2_PACKAGE_PYTHON_MAD
- bool "python-mad"
- depends on BR2_PACKAGE_PYTHON
- select BR2_PACKAGE_LIBMAD
- help
- python-mad is a Python binding for the MAD library, a
- high-quality integer-only MPEG decoder.
-
- http://spacepants.org/src/pymad/
diff --git a/package/multimedia/python-mad/python-mad.mk b/package/multimedia/python-mad/python-mad.mk
deleted file mode 100644
index 7d898ed..0000000
--- a/package/multimedia/python-mad/python-mad.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-#############################################################
-#
-# python-mad
-#
-#############################################################
-
-PYTHON_MAD_VERSION = 0.6
-PYTHON_MAD_SOURCE = pymad-$(PYTHON_MAD_VERSION).tar.gz
-PYTHON_MAD_SITE = http://spacepants.org/src/pymad/download/
-
-PYTHON_MAD_DEPENDENCIES = python libmad
-
-ifeq ($(BR2_ENDIAN),"LITTLE")
-PYTHON_MAD_ENDIAN=little
-else
-PYTHON_MAD_ENDIAN=big
-endif
-
-define PYTHON_MAD_CONFIGURE_CMDS
- echo "endian = $(PYTHON_MAD_ENDIAN)" > $(@D)/Setup
- echo "mad_libs = mad" >> $(@D)/Setup
- echo "mad_lib_dir = $(STAGING_DIR)/usr/lib" >> $(@D)/Setup
- echo "mad_include_dir = $(STAGING_DIR)/usr/include" >> $(@D)/Setup
-endef
-
-define PYTHON_MAD_BUILD_CMDS
- (cd $(@D); \
- CC="$(TARGET_CC)" \
- CFLAGS="$(TARGET_CFLAGS)" \
- LDSHARED="$(TARGET_CC) -shared" \
- LDFLAGS="$(TARGET_LDFLAGS)" \
- $(HOST_DIR)/usr/bin/python setup.py build_ext \
- --include-dirs=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR))
- (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build)
-endef
-
-define PYTHON_MAD_INSTALL_TARGET_CMDS
- (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
-endef
-
-$(eval $(call GENTARGETS))
diff --git a/package/python-mad/Config.in b/package/python-mad/Config.in
new file mode 100644
index 0000000..2535421
--- /dev/null
+++ b/package/python-mad/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_PYTHON_MAD
+ bool "python-mad"
+ depends on BR2_PACKAGE_PYTHON
+ select BR2_PACKAGE_LIBMAD
+ help
+ python-mad is a Python binding for the MAD library, a
+ high-quality integer-only MPEG decoder.
+
+ http://spacepants.org/src/pymad/
diff --git a/package/python-mad/python-mad.mk b/package/python-mad/python-mad.mk
new file mode 100644
index 0000000..7d898ed
--- /dev/null
+++ b/package/python-mad/python-mad.mk
@@ -0,0 +1,41 @@
+#############################################################
+#
+# python-mad
+#
+#############################################################
+
+PYTHON_MAD_VERSION = 0.6
+PYTHON_MAD_SOURCE = pymad-$(PYTHON_MAD_VERSION).tar.gz
+PYTHON_MAD_SITE = http://spacepants.org/src/pymad/download/
+
+PYTHON_MAD_DEPENDENCIES = python libmad
+
+ifeq ($(BR2_ENDIAN),"LITTLE")
+PYTHON_MAD_ENDIAN=little
+else
+PYTHON_MAD_ENDIAN=big
+endif
+
+define PYTHON_MAD_CONFIGURE_CMDS
+ echo "endian = $(PYTHON_MAD_ENDIAN)" > $(@D)/Setup
+ echo "mad_libs = mad" >> $(@D)/Setup
+ echo "mad_lib_dir = $(STAGING_DIR)/usr/lib" >> $(@D)/Setup
+ echo "mad_include_dir = $(STAGING_DIR)/usr/include" >> $(@D)/Setup
+endef
+
+define PYTHON_MAD_BUILD_CMDS
+ (cd $(@D); \
+ CC="$(TARGET_CC)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDSHARED="$(TARGET_CC) -shared" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ $(HOST_DIR)/usr/bin/python setup.py build_ext \
+ --include-dirs=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR))
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build)
+endef
+
+define PYTHON_MAD_INSTALL_TARGET_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+$(eval $(call GENTARGETS))
--
1.7.1.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 2/6] Python: enable zlib support for the host package
2012-01-04 11:29 [Buildroot] [PATCH v5 0/6] Python related changes yegorslists at googlemail.com
2012-01-04 11:30 ` [Buildroot] [PATCH v5 1/6] Python: add external modules option yegorslists at googlemail.com
@ 2012-01-04 11:30 ` yegorslists at googlemail.com
2012-01-07 19:54 ` Peter Korsgaard
2012-01-04 11:30 ` [Buildroot] [PATCH v5 3/6] New package: python-dpkt yegorslists at googlemail.com
` (3 subsequent siblings)
5 siblings, 1 reply; 18+ messages in thread
From: yegorslists at googlemail.com @ 2012-01-04 11:30 UTC (permalink / raw)
To: buildroot
From: Yegor Yefremov <yegorslists@googlemail.com>
zlib is needed for the host-setuptools package
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
package/python/python.mk | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/package/python/python.mk b/package/python/python.mk
index 9ef2ccc..78895d4 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -28,7 +28,6 @@ HOST_PYTHON_CONF_OPT += \
--disable-bsddb \
--disable-test-modules \
--disable-bz2 \
- --disable-zlib \
--disable-ssl
HOST_PYTHON_MAKE_ENV = \
@@ -52,7 +51,7 @@ endef
PYTHON_DEPENDENCIES = host-python libffi
-HOST_PYTHON_DEPENDENCIES = host-expat
+HOST_PYTHON_DEPENDENCIES = host-expat host-zlib
PYTHON_INSTALL_STAGING = YES
--
1.7.1.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 3/6] New package: python-dpkt
2012-01-04 11:29 [Buildroot] [PATCH v5 0/6] Python related changes yegorslists at googlemail.com
2012-01-04 11:30 ` [Buildroot] [PATCH v5 1/6] Python: add external modules option yegorslists at googlemail.com
2012-01-04 11:30 ` [Buildroot] [PATCH v5 2/6] Python: enable zlib support for the host package yegorslists at googlemail.com
@ 2012-01-04 11:30 ` yegorslists at googlemail.com
2012-01-05 10:14 ` Julien Boibessot
2012-01-07 19:57 ` Peter Korsgaard
2012-01-04 11:30 ` [Buildroot] [PATCH v5 4/6] New package: python-setuptools yegorslists at googlemail.com
` (2 subsequent siblings)
5 siblings, 2 replies; 18+ messages in thread
From: yegorslists at googlemail.com @ 2012-01-04 11:30 UTC (permalink / raw)
To: buildroot
From: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
package/Config.in | 1 +
package/python-dpkt/Config.in | 11 +++++++++++
package/python-dpkt/python-dpkt.mk | 22 ++++++++++++++++++++++
3 files changed, 34 insertions(+), 0 deletions(-)
create mode 100644 package/python-dpkt/Config.in
create mode 100644 package/python-dpkt/python-dpkt.mk
diff --git a/package/Config.in b/package/Config.in
index 6ab893f..bb5e5b0 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -238,6 +238,7 @@ source "package/php/Config.in"
source "package/python/Config.in"
if BR2_PACKAGE_PYTHON
menu "external python modules"
+source "package/python-dpkt/Config.in"
source "package/python-mad/Config.in"
source "package/python-serial/Config.in"
endmenu
diff --git a/package/python-dpkt/Config.in b/package/python-dpkt/Config.in
new file mode 100644
index 0000000..aac9f09
--- /dev/null
+++ b/package/python-dpkt/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_PYTHON_DPKT
+ bool "python-dpkt"
+ depends on BR2_PACKAGE_PYTHON
+ select BR2_PACKAGE_PYTHON_ZLIB
+ help
+ Fast, simple packet creation / parsing, with definitions
+ for the basic TCP/IP protocols.
+
+ http://code.google.com/p/dpkt/
+
+
diff --git a/package/python-dpkt/python-dpkt.mk b/package/python-dpkt/python-dpkt.mk
new file mode 100644
index 0000000..7ac873c
--- /dev/null
+++ b/package/python-dpkt/python-dpkt.mk
@@ -0,0 +1,22 @@
+#############################################################
+#
+# python-dpkt
+#
+#############################################################
+
+PYTHON_DPKT_VERSION = 1.7
+PYTHON_DPKT_SOURCE = dpkt-$(PYTHON_DPKT_VERSION).tar.gz
+PYTHON_DPKT_SITE = http://dpkt.googlecode.com/files
+
+PYTHON_DPKT_DEPENDENCIES = python
+
+define PYTHON_DPKT_BUILD_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build)
+endef
+
+define PYTHON_DPKT_INSTALL_TARGET_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+$(eval $(call GENTARGETS))
+
--
1.7.1.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 4/6] New package: python-setuptools
2012-01-04 11:29 [Buildroot] [PATCH v5 0/6] Python related changes yegorslists at googlemail.com
` (2 preceding siblings ...)
2012-01-04 11:30 ` [Buildroot] [PATCH v5 3/6] New package: python-dpkt yegorslists at googlemail.com
@ 2012-01-04 11:30 ` yegorslists at googlemail.com
2012-01-07 19:58 ` Peter Korsgaard
2012-01-04 11:30 ` [Buildroot] [PATCH v5 5/6] New package: python-distutilscross yegorslists at googlemail.com
2012-01-04 11:30 ` [Buildroot] [PATCH v5 6/6] New package: python-netifaces yegorslists at googlemail.com
5 siblings, 1 reply; 18+ messages in thread
From: yegorslists at googlemail.com @ 2012-01-04 11:30 UTC (permalink / raw)
To: buildroot
From: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
package/Config.in | 1 +
package/python-setuptools/Config.in | 8 +++++
package/python-setuptools/python-setuptools.mk | 34 ++++++++++++++++++++++++
3 files changed, 43 insertions(+), 0 deletions(-)
create mode 100644 package/python-setuptools/Config.in
create mode 100644 package/python-setuptools/python-setuptools.mk
diff --git a/package/Config.in b/package/Config.in
index bb5e5b0..71e1889 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -241,6 +241,7 @@ menu "external python modules"
source "package/python-dpkt/Config.in"
source "package/python-mad/Config.in"
source "package/python-serial/Config.in"
+source "package/python-setuptools/Config.in"
endmenu
endif
source "package/ruby/Config.in"
diff --git a/package/python-setuptools/Config.in b/package/python-setuptools/Config.in
new file mode 100644
index 0000000..63c2b01
--- /dev/null
+++ b/package/python-setuptools/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PYTHON_SETUPTOOLS
+ bool "python-setuptools"
+ depends on BR2_PACKAGE_PYTHON
+ select BR2_PACKAGE_PYTHON_ZLIB
+ help
+ Download, build, install, upgrade, and uninstall Python packages.
+
+ http://pypi.python.org/pypi/setuptools
diff --git a/package/python-setuptools/python-setuptools.mk b/package/python-setuptools/python-setuptools.mk
new file mode 100644
index 0000000..b75987b
--- /dev/null
+++ b/package/python-setuptools/python-setuptools.mk
@@ -0,0 +1,34 @@
+#############################################################
+#
+# python-setuptools
+#
+#############################################################
+
+PYTHON_SETUPTOOLS_VERSION = 0.6c11
+PYTHON_SETUPTOOLS_SOURCE = setuptools-$(PYTHON_SETUPTOOLS_VERSION).tar.gz
+PYTHON_SETUPTOOLS_SITE = http://pypi.python.org/packages/source/s/setuptools
+PYTHON_SETUPTOOLS_DEPENDENCIES = python
+HOST_PYTHON_SETUPTOOLS_DEPENDENCIES = host-python
+
+
+define HOST_PYTHON_SETUPTOOLS_BUILD_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build)
+endef
+
+define PYTHON_SETUPTOOLS_BUILD_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build)
+endef
+
+define HOST_PYTHON_SETUPTOOLS_INSTALL_CMDS
+ (cd $(@D); PYTHONPATH="$(HOST_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages"\
+ $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(HOST_DIR)/usr)
+endef
+
+define PYTHON_SETUPTOOLS_INSTALL_TARGET_CMDS
+ (cd $(@D); PYTHONPATH="$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages"\
+ $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+$(eval $(call GENTARGETS))
+$(eval $(call GENTARGETS,host))
+
--
1.7.1.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 5/6] New package: python-distutilscross
2012-01-04 11:29 [Buildroot] [PATCH v5 0/6] Python related changes yegorslists at googlemail.com
` (3 preceding siblings ...)
2012-01-04 11:30 ` [Buildroot] [PATCH v5 4/6] New package: python-setuptools yegorslists at googlemail.com
@ 2012-01-04 11:30 ` yegorslists at googlemail.com
2012-01-07 19:59 ` Peter Korsgaard
2012-01-04 11:30 ` [Buildroot] [PATCH v5 6/6] New package: python-netifaces yegorslists at googlemail.com
5 siblings, 1 reply; 18+ messages in thread
From: yegorslists at googlemail.com @ 2012-01-04 11:30 UTC (permalink / raw)
To: buildroot
From: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
.../python-distutilscross/python-distutilscross.mk | 22 ++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
create mode 100644 package/python-distutilscross/python-distutilscross.mk
diff --git a/package/python-distutilscross/python-distutilscross.mk b/package/python-distutilscross/python-distutilscross.mk
new file mode 100644
index 0000000..41def71
--- /dev/null
+++ b/package/python-distutilscross/python-distutilscross.mk
@@ -0,0 +1,22 @@
+#############################################################
+#
+# python-distutilscross
+#
+#############################################################
+
+PYTHON_DISTUTILSCROSS_VERSION = 0.1
+PYTHON_DISTUTILSCROSS_SOURCE = distutilscross-$(PYTHON_DISTUTILSCROSS_VERSION).tar.gz
+PYTHON_DISTUTILSCROSS_SITE = http://pypi.python.org/packages/source/d/distutilscross
+
+HOST_PYTHON_DISTUTILSCROSS_DEPENDENCIES = host-python host-python-setuptools
+
+define HOST_PYTHON_DISTUTILSCROSS_BUILD_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build)
+endef
+
+define HOST_PYTHON_DISTUTILSCROSS_INSTALL_CMDS
+ (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(HOST_DIR)/usr)
+endef
+
+$(eval $(call GENTARGETS,host))
+
--
1.7.1.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 6/6] New package: python-netifaces
2012-01-04 11:29 [Buildroot] [PATCH v5 0/6] Python related changes yegorslists at googlemail.com
` (4 preceding siblings ...)
2012-01-04 11:30 ` [Buildroot] [PATCH v5 5/6] New package: python-distutilscross yegorslists at googlemail.com
@ 2012-01-04 11:30 ` yegorslists at googlemail.com
2012-01-07 20:00 ` Peter Korsgaard
5 siblings, 1 reply; 18+ messages in thread
From: yegorslists at googlemail.com @ 2012-01-04 11:30 UTC (permalink / raw)
To: buildroot
From: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
package/Config.in | 1 +
package/python-netifaces/Config.in | 9 +++
.../python-netifaces-fix-cross-build.patch | 54 ++++++++++++++++++++
package/python-netifaces/python-netifaces.mk | 27 ++++++++++
4 files changed, 91 insertions(+), 0 deletions(-)
create mode 100644 package/python-netifaces/Config.in
create mode 100644 package/python-netifaces/python-netifaces-fix-cross-build.patch
create mode 100644 package/python-netifaces/python-netifaces.mk
diff --git a/package/Config.in b/package/Config.in
index 71e1889..666a224 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -240,6 +240,7 @@ if BR2_PACKAGE_PYTHON
menu "external python modules"
source "package/python-dpkt/Config.in"
source "package/python-mad/Config.in"
+source "package/python-netifaces/Config.in"
source "package/python-serial/Config.in"
source "package/python-setuptools/Config.in"
endmenu
diff --git a/package/python-netifaces/Config.in b/package/python-netifaces/Config.in
new file mode 100644
index 0000000..199191c
--- /dev/null
+++ b/package/python-netifaces/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_PYTHON_NETIFACES
+ bool "python-netifaces"
+ depends on BR2_PACKAGE_PYTHON
+ select BR2_PACKAGE_PYTHON_SETUPTOOLS
+ help
+ Portable access to network interfaces from Python.
+
+ http://alastairs-place.net/projects/netifaces
+
diff --git a/package/python-netifaces/python-netifaces-fix-cross-build.patch b/package/python-netifaces/python-netifaces-fix-cross-build.patch
new file mode 100644
index 0000000..5a11b61
--- /dev/null
+++ b/package/python-netifaces/python-netifaces-fix-cross-build.patch
@@ -0,0 +1,54 @@
+fix cross-compilation issues:
+
+- don't execute cross-compiled binaries
+- pass LDFLAGS to linker
+
+Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
+---
+ setup.py | 19 +++++++------------
+ 1 file changed, 7 insertions(+), 12 deletions(-)
+
+Index: b/setup.py
+===================================================================
+--- a/setup.py
++++ b/setup.py
+@@ -67,17 +67,8 @@
+ libraries=libraries,
+ debug=self.debug)
+ if execute:
+- abspath = os.path.abspath(os.path.join(self.build_temp,
+- 'conftest'))
+- pipe = os.popen(abspath, 'r')
+- result = pipe.read().strip()
+- status = pipe.close()
+- if status is None:
+- status = 0
+- if result == '':
+- result = True
+- if status != 0:
+- result = False
++ # cross-compiled code can't be executed
++ result = True
+
+ finally:
+ os.dup2(mystdout, 1)
+@@ -89,6 +80,10 @@
+ return result
+
+ def check_requirements(self):
++ # get library dirs
++ if os.environ.has_key('LDFLAGS'):
++ lib_dirs = os.environ['LDFLAGS']
++
+ # Load the cached config data from a previous run if possible; compiling
+ # things to test for features is slow
+ cache_file = os.path.join(self.build_temp, 'config.cache')
+@@ -356,7 +351,7 @@
+ in optional_headers]),
+ 'sockaddr': sockaddr }
+
+- if self.test_build(testrig, execute=False):
++ if self.test_build(testrig, execute=False, library_dirs = [lib_dirs]):
+ result.append(sockaddr)
+
+ if result:
diff --git a/package/python-netifaces/python-netifaces.mk b/package/python-netifaces/python-netifaces.mk
new file mode 100644
index 0000000..6473e23
--- /dev/null
+++ b/package/python-netifaces/python-netifaces.mk
@@ -0,0 +1,27 @@
+#############################################################
+#
+# python-netifaces
+#
+#############################################################
+
+PYTHON_NETIFACES_VERSION = 0.6
+PYTHON_NETIFACES_SOURCE = netifaces-$(PYTHON_NETIFACES_VERSION).tar.gz
+PYTHON_NETIFACES_SITE = http://alastairs-place.net/projects/netifaces
+
+PYTHON_NETIFACES_DEPENDENCIES = python host-python-setuptools host-python-distutilscross
+
+define PYTHON_NETIFACES_BUILD_CMDS
+ (cd $(@D); \
+ PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \
+ LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
+ $(HOST_DIR)/usr/bin/python setup.py build)
+endef
+
+define PYTHON_NETIFACES_INSTALL_TARGET_CMDS
+ (cd $(@D); PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
+ $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+
+$(eval $(call GENTARGETS))
+
--
1.7.1.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 3/6] New package: python-dpkt
2012-01-04 11:30 ` [Buildroot] [PATCH v5 3/6] New package: python-dpkt yegorslists at googlemail.com
@ 2012-01-05 10:14 ` Julien Boibessot
2012-01-05 10:16 ` Thomas Petazzoni
2012-01-07 19:57 ` Peter Korsgaard
1 sibling, 1 reply; 18+ messages in thread
From: Julien Boibessot @ 2012-01-05 10:14 UTC (permalink / raw)
To: buildroot
On 01/04/2012 12:30 PM, yegorslists at googlemail.com wrote:
> diff --git a/package/python-dpkt/python-dpkt.mk b/package/python-dpkt/python-dpkt.mk
> new file mode 100644
> index 0000000..7ac873c
> --- /dev/null
> +++ b/package/python-dpkt/python-dpkt.mk
> @@ -0,0 +1,22 @@
> +#############################################################
> +#
> +# python-dpkt
> +#
> +#############################################################
> +
> +PYTHON_DPKT_VERSION = 1.7
> +PYTHON_DPKT_SOURCE = dpkt-$(PYTHON_DPKT_VERSION).tar.gz
> +PYTHON_DPKT_SITE = http://dpkt.googlecode.com/files
> +
> +PYTHON_DPKT_DEPENDENCIES = python
> +
> +define PYTHON_DPKT_BUILD_CMDS
> + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build)
> +endef
> +
> +define PYTHON_DPKT_INSTALL_TARGET_CMDS
> + (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
> +endef
> +
> +$(eval $(call GENTARGETS))
> +
Do somebody ever thought in doing a distutils package infrastructure
that would make the adding of a new python package just a matter of:
$(eval $(call DISTUTILSTARGETS))
(or something like that)
?
Regards,
Julien
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 3/6] New package: python-dpkt
2012-01-05 10:14 ` Julien Boibessot
@ 2012-01-05 10:16 ` Thomas Petazzoni
2012-01-05 10:37 ` Yegor Yefremov
0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2012-01-05 10:16 UTC (permalink / raw)
To: buildroot
Le Thu, 05 Jan 2012 11:14:09 +0100,
Julien Boibessot <julien.boibessot@free.fr> a ?crit :
> Do somebody ever thought in doing a distutils package infrastructure
> that would make the adding of a new python package just a matter of:
> $(eval $(call DISTUTILSTARGETS))
> (or something like that)
Yeah, we discussed that sometime ago. I think our conclusion was:
"let's wait to have a few Python packages to see what are the common
things and then we'll do an infrastructure". I guess we could merge
Yegor's patches as is and then work on a common infrastructure.
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 3/6] New package: python-dpkt
2012-01-05 10:16 ` Thomas Petazzoni
@ 2012-01-05 10:37 ` Yegor Yefremov
0 siblings, 0 replies; 18+ messages in thread
From: Yegor Yefremov @ 2012-01-05 10:37 UTC (permalink / raw)
To: buildroot
Am 05.01.2012 11:16, schrieb Thomas Petazzoni:
> Le Thu, 05 Jan 2012 11:14:09 +0100,
> Julien Boibessot <julien.boibessot@free.fr> a ?crit :
>
>> Do somebody ever thought in doing a distutils package infrastructure
>> that would make the adding of a new python package just a matter of:
>> $(eval $(call DISTUTILSTARGETS))
>> (or something like that)
>
> Yeah, we discussed that sometime ago. I think our conclusion was:
> "let's wait to have a few Python packages to see what are the common
> things and then we'll do an infrastructure". I guess we could merge
> Yegor's patches as is and then work on a common infrastructure.
I agree. These package can be merged as they are. In the patch series we have 3 packages all using different installation methods:
dpkt - uses internal distutils and ships no C code
mad - uses internal distutils but a part of it must be cross-compiled
netifaces - uses setuptools on top of distutils, has C code and uses distutilscross to get the code crosscompiled
in the future there will be one more internal tool ditsutils2 https://bitbucket.org/tarek/distutils2/overview
and Chris Lambacher is going to PyCon with following talk: https://us.pycon.org/2012/schedule/presentation/11/
So we should wait a little till the sings will calm down and then make our decision.
Best regards,
Yegor
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 1/6] Python: add external modules option
2012-01-04 11:30 ` [Buildroot] [PATCH v5 1/6] Python: add external modules option yegorslists at googlemail.com
@ 2012-01-07 19:54 ` Peter Korsgaard
0 siblings, 0 replies; 18+ messages in thread
From: Peter Korsgaard @ 2012-01-07 19:54 UTC (permalink / raw)
To: buildroot
>>>>> "yegorslists" == yegorslists <yegorslists@googlemail.com> writes:
yegorslists> From: Yegor Yefremov <yegorslists@googlemail.com>
yegorslists> all external python packages/libraries should reside in
yegorslists> "external python modules" section.
yegorslists> Move existing modules python-serial and python-mad there
yegorslists> Move python-mad from package/multimedia to package
Committed, thanks. Please consider enabling git's rename detection (-M)
to make such a patch here a lot easier to review.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 2/6] Python: enable zlib support for the host package
2012-01-04 11:30 ` [Buildroot] [PATCH v5 2/6] Python: enable zlib support for the host package yegorslists at googlemail.com
@ 2012-01-07 19:54 ` Peter Korsgaard
0 siblings, 0 replies; 18+ messages in thread
From: Peter Korsgaard @ 2012-01-07 19:54 UTC (permalink / raw)
To: buildroot
>>>>> "yegorslists" == yegorslists <yegorslists@googlemail.com> writes:
yegorslists> From: Yegor Yefremov <yegorslists@googlemail.com>
yegorslists> zlib is needed for the host-setuptools package
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 3/6] New package: python-dpkt
2012-01-04 11:30 ` [Buildroot] [PATCH v5 3/6] New package: python-dpkt yegorslists at googlemail.com
2012-01-05 10:14 ` Julien Boibessot
@ 2012-01-07 19:57 ` Peter Korsgaard
1 sibling, 0 replies; 18+ messages in thread
From: Peter Korsgaard @ 2012-01-07 19:57 UTC (permalink / raw)
To: buildroot
>>>>> "yegorslists" == yegorslists <yegorslists@googlemail.com> writes:
yegorslists> From: Yegor Yefremov <yegorslists@googlemail.com>
yegorslists> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
yegorslists> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 4/6] New package: python-setuptools
2012-01-04 11:30 ` [Buildroot] [PATCH v5 4/6] New package: python-setuptools yegorslists at googlemail.com
@ 2012-01-07 19:58 ` Peter Korsgaard
0 siblings, 0 replies; 18+ messages in thread
From: Peter Korsgaard @ 2012-01-07 19:58 UTC (permalink / raw)
To: buildroot
>>>>> "yegorslists" == yegorslists <yegorslists@googlemail.com> writes:
yegorslists> From: Yegor Yefremov <yegorslists@googlemail.com>
yegorslists> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 5/6] New package: python-distutilscross
2012-01-04 11:30 ` [Buildroot] [PATCH v5 5/6] New package: python-distutilscross yegorslists at googlemail.com
@ 2012-01-07 19:59 ` Peter Korsgaard
0 siblings, 0 replies; 18+ messages in thread
From: Peter Korsgaard @ 2012-01-07 19:59 UTC (permalink / raw)
To: buildroot
>>>>> "yegorslists" == yegorslists <yegorslists@googlemail.com> writes:
yegorslists> From: Yegor Yefremov <yegorslists@googlemail.com>
yegorslists> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 6/6] New package: python-netifaces
2012-01-04 11:30 ` [Buildroot] [PATCH v5 6/6] New package: python-netifaces yegorslists at googlemail.com
@ 2012-01-07 20:00 ` Peter Korsgaard
2012-01-08 11:03 ` Peter Korsgaard
0 siblings, 1 reply; 18+ messages in thread
From: Peter Korsgaard @ 2012-01-07 20:00 UTC (permalink / raw)
To: buildroot
>>>>> "yegorslists" == yegorslists <yegorslists@googlemail.com> writes:
yegorslists> From: Yegor Yefremov <yegorslists@googlemail.com>
yegorslists> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 6/6] New package: python-netifaces
2012-01-07 20:00 ` Peter Korsgaard
@ 2012-01-08 11:03 ` Peter Korsgaard
2012-01-09 7:46 ` Yegor Yefremov
0 siblings, 1 reply; 18+ messages in thread
From: Peter Korsgaard @ 2012-01-08 11:03 UTC (permalink / raw)
To: buildroot
>>>>> "Peter" == Peter Korsgaard <jacmet@uclibc.org> writes:
>>>>> "yegorslists" == yegorslists <yegorslists@googlemail.com> writes:
yegorslists> From: Yegor Yefremov <yegorslists@googlemail.com>
yegorslists> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Peter> Committed, thanks.
It unfortunately seems broken and tries to build for the host rather
than the target:
(on a ppc64 host building for i686):
creating build/lib.linux-ppc64-2.7
/usr/lib64/ccache/gcc -pthread -shared -L/home/peko/scratch/host/lib -L/home/peko/scratch/host/usr/lib -Wl,-rpath,/home/peko/scratch/host/usr/lib -L/home/peko/scratch/host/usr/i686-unknown-linux-uclibc/sysroot/lib -L/home/peko/scratch/host/usr/i686-unknown-linux-uclibc/sysroot/usr/lib build/temp.linux-ppc64-2.7/netifaces.o -o build/lib.linux-ppc64-2.7/netifaces.so
/usr/bin/ld: skipping incompatible /home/peko/scratch/host/usr/i686-unknown-linux-uclibc/sysroot/lib/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: skipping incompatible /lib/libpthread.so.0 when searching for /lib/libpthread.so.0
/usr/bin/ld: cannot find /lib/libpthread.so.0
/usr/bin/ld: skipping incompatible /usr/lib/libpthread_nonshared.a when searching for /usr/lib/libpthread_nonshared.a
/usr/bin/ld: cannot find /usr/lib/libpthread_nonshared.a
collect2: ld returned 1 exit status
error: command '/usr/lib64/ccache/gcc' failed with exit status 1
make: *** [/home/peko/scratch/build/python-netifaces-0.6/.stamp_built] Error 1
Any ideas?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v5 6/6] New package: python-netifaces
2012-01-08 11:03 ` Peter Korsgaard
@ 2012-01-09 7:46 ` Yegor Yefremov
0 siblings, 0 replies; 18+ messages in thread
From: Yegor Yefremov @ 2012-01-09 7:46 UTC (permalink / raw)
To: buildroot
On Sun, Jan 8, 2012 at 12:03 PM, Peter Korsgaard <jacmet@sunsite.dk> wrote:
>>>>>> "Peter" == Peter Korsgaard <jacmet@uclibc.org> writes:
>
>>>>>> "yegorslists" == yegorslists ?<yegorslists@googlemail.com> writes:
> ?yegorslists> From: Yegor Yefremov <yegorslists@googlemail.com>
> ?yegorslists> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
>
> ?Peter> Committed, thanks.
>
> It unfortunately seems broken and tries to build for the host rather
> than the target:
>
> (on a ppc64 host building for i686):
>
> creating build/lib.linux-ppc64-2.7
> /usr/lib64/ccache/gcc -pthread -shared -L/home/peko/scratch/host/lib -L/home/peko/scratch/host/usr/lib -Wl,-rpath,/home/peko/scratch/host/usr/lib -L/home/peko/scratch/host/usr/i686-unknown-linux-uclibc/sysroot/lib -L/home/peko/scratch/host/usr/i686-unknown-linux-uclibc/sysroot/usr/lib build/temp.linux-ppc64-2.7/netifaces.o -o build/lib.linux-ppc64-2.7/netifaces.so
> /usr/bin/ld: skipping incompatible /home/peko/scratch/host/usr/i686-unknown-linux-uclibc/sysroot/lib/libgcc_s.so when searching for -lgcc_s
> /usr/bin/ld: skipping incompatible /lib/libpthread.so.0 when searching for /lib/libpthread.so.0
> /usr/bin/ld: cannot find /lib/libpthread.so.0
> /usr/bin/ld: skipping incompatible /usr/lib/libpthread_nonshared.a when searching for /usr/lib/libpthread_nonshared.a
> /usr/bin/ld: cannot find /usr/lib/libpthread_nonshared.a
> collect2: ld returned 1 exit status
> error: command '/usr/lib64/ccache/gcc' failed with exit status 1
> make: *** [/home/peko/scratch/build/python-netifaces-0.6/.stamp_built] Error 1
>
> Any ideas?
My bad. I had some problems reorganizing my patches and forgot -x
option by build command. Still learning git :-( Please test the patch
I submitted.
Yegor
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2012-01-09 7:46 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-04 11:29 [Buildroot] [PATCH v5 0/6] Python related changes yegorslists at googlemail.com
2012-01-04 11:30 ` [Buildroot] [PATCH v5 1/6] Python: add external modules option yegorslists at googlemail.com
2012-01-07 19:54 ` Peter Korsgaard
2012-01-04 11:30 ` [Buildroot] [PATCH v5 2/6] Python: enable zlib support for the host package yegorslists at googlemail.com
2012-01-07 19:54 ` Peter Korsgaard
2012-01-04 11:30 ` [Buildroot] [PATCH v5 3/6] New package: python-dpkt yegorslists at googlemail.com
2012-01-05 10:14 ` Julien Boibessot
2012-01-05 10:16 ` Thomas Petazzoni
2012-01-05 10:37 ` Yegor Yefremov
2012-01-07 19:57 ` Peter Korsgaard
2012-01-04 11:30 ` [Buildroot] [PATCH v5 4/6] New package: python-setuptools yegorslists at googlemail.com
2012-01-07 19:58 ` Peter Korsgaard
2012-01-04 11:30 ` [Buildroot] [PATCH v5 5/6] New package: python-distutilscross yegorslists at googlemail.com
2012-01-07 19:59 ` Peter Korsgaard
2012-01-04 11:30 ` [Buildroot] [PATCH v5 6/6] New package: python-netifaces yegorslists at googlemail.com
2012-01-07 20:00 ` Peter Korsgaard
2012-01-08 11:03 ` Peter Korsgaard
2012-01-09 7:46 ` Yegor Yefremov
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.