Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/2] Python: add external modules option
@ 2011-12-14 14:36 yegorslists at googlemail.com
  2011-12-14 14:36 ` [Buildroot] [PATCH v2 2/2] New package: python-dpkt yegorslists at googlemail.com
  2011-12-19  7:25 ` [Buildroot] [PATCH v2 1/2] Python: add external modules option Arnout Vandecappelle
  0 siblings, 2 replies; 6+ messages in thread
From: yegorslists at googlemail.com @ 2011-12-14 14:36 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>
---
 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] 6+ messages in thread

* [Buildroot] [PATCH v2 2/2] New package: python-dpkt
  2011-12-14 14:36 [Buildroot] [PATCH v2 1/2] Python: add external modules option yegorslists at googlemail.com
@ 2011-12-14 14:36 ` yegorslists at googlemail.com
  2011-12-14 15:25   ` Thomas Petazzoni
  2011-12-19  7:25 ` [Buildroot] [PATCH v2 1/2] Python: add external modules option Arnout Vandecappelle
  1 sibling, 1 reply; 6+ messages in thread
From: yegorslists at googlemail.com @ 2011-12-14 14:36 UTC (permalink / raw)
  To: buildroot

From: Yegor Yefremov <yegorslists@googlemail.com>

python-dpkt-setup.patch removes dpkt inclusion in setup.py
and stores package metadata directly in setup.py. This avoids
unneeded host-python dependencies like zlib

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 package/Config.in                           |    1 +
 package/python-dpkt/Config.in               |   11 +++++++++++
 package/python-dpkt/python-dpkt-setup.patch |   23 +++++++++++++++++++++++
 package/python-dpkt/python-dpkt.mk          |   22 ++++++++++++++++++++++
 4 files changed, 57 insertions(+), 0 deletions(-)
 create mode 100644 package/python-dpkt/Config.in
 create mode 100644 package/python-dpkt/python-dpkt-setup.patch
 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-setup.patch b/package/python-dpkt/python-dpkt-setup.patch
new file mode 100644
index 0000000..d6f24ce
--- /dev/null
+++ b/package/python-dpkt/python-dpkt-setup.patch
@@ -0,0 +1,23 @@
+---
+ setup.py |    7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+Index: b/setup.py
+===================================================================
+--- a/setup.py
++++ b/setup.py
+@@ -1,11 +1,10 @@
+ #!/usr/bin/env python
+
+ from distutils.core import setup
+-import dpkt
+
+ setup(name='dpkt',
+-      version=dpkt.__version__,
+-      author=dpkt.__author__,
+-      url=dpkt.__url__,
++      version='1.7',
++      author='Dug Song <dugsong@monkey.org>',
++      url='http://dpkt.googlecode.com/',
+       description='dumb packet module',
+       packages=[ '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] 6+ messages in thread

* [Buildroot] [PATCH v2 2/2] New package: python-dpkt
  2011-12-14 14:36 ` [Buildroot] [PATCH v2 2/2] New package: python-dpkt yegorslists at googlemail.com
@ 2011-12-14 15:25   ` Thomas Petazzoni
  2011-12-14 15:36     ` Yegor Yefremov
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2011-12-14 15:25 UTC (permalink / raw)
  To: buildroot

Le Wed, 14 Dec 2011 15:36:26 +0100,
yegorslists at googlemail.com a ?crit :

> --- /dev/null
> +++ b/package/python-dpkt/python-dpkt-setup.patch
> @@ -0,0 +1,23 @@
> +---
> + setup.py |    7 +++----

Description + SoB line needed here. And also push upstream the patch
explaining why it is stupid do depends on the Python module to be
installed during the build process.

> +PYTHON_DPKT_SOURCE  = dpkt-$(PYTHON_DPKT_VERSION).tar.gz

That's the default value, so it could be dropped.

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] 6+ messages in thread

* [Buildroot] [PATCH v2 2/2] New package: python-dpkt
  2011-12-14 15:25   ` Thomas Petazzoni
@ 2011-12-14 15:36     ` Yegor Yefremov
  2011-12-14 15:42       ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Yegor Yefremov @ 2011-12-14 15:36 UTC (permalink / raw)
  To: buildroot

Am 14.12.2011 16:25, schrieb Thomas Petazzoni:
> Le Wed, 14 Dec 2011 15:36:26 +0100,
> yegorslists at googlemail.com a ?crit :
> 
>> --- /dev/null
>> +++ b/package/python-dpkt/python-dpkt-setup.patch
>> @@ -0,0 +1,23 @@
>> +---
>> + setup.py |    7 +++----
> 
> Description + SoB line needed here. And also push upstream the patch
> explaining why it is stupid do depends on the Python module to be
> installed during the build process.

ACK

>> +PYTHON_DPKT_SOURCE  = dpkt-$(PYTHON_DPKT_VERSION).tar.gz
> 
> That's the default value, so it could be dropped.

No. It can't. Because the BR package is called python-dpkt and real package dpkt.

Best regards,
Yegor

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

* [Buildroot] [PATCH v2 2/2] New package: python-dpkt
  2011-12-14 15:36     ` Yegor Yefremov
@ 2011-12-14 15:42       ` Thomas Petazzoni
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2011-12-14 15:42 UTC (permalink / raw)
  To: buildroot

Le Wed, 14 Dec 2011 16:36:00 +0100,
Yegor Yefremov <yegor_sub1@visionsystems.de> a ?crit :

> No. It can't. Because the BR package is called python-dpkt and real package dpkt.

Ok, my bad, you're obviously right on this point.

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] 6+ messages in thread

* [Buildroot] [PATCH v2 1/2] Python: add external modules option
  2011-12-14 14:36 [Buildroot] [PATCH v2 1/2] Python: add external modules option yegorslists at googlemail.com
  2011-12-14 14:36 ` [Buildroot] [PATCH v2 2/2] New package: python-dpkt yegorslists at googlemail.com
@ 2011-12-19  7:25 ` Arnout Vandecappelle
  1 sibling, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2011-12-19  7:25 UTC (permalink / raw)
  To: buildroot

On Wednesday 14 December 2011 15:36:25 yegorslists at googlemail.com wrote:
> 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>

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
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:  31BB CF53 8660 6F88 345D  54CC A836 5879 20D7 CF43

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

end of thread, other threads:[~2011-12-19  7:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-14 14:36 [Buildroot] [PATCH v2 1/2] Python: add external modules option yegorslists at googlemail.com
2011-12-14 14:36 ` [Buildroot] [PATCH v2 2/2] New package: python-dpkt yegorslists at googlemail.com
2011-12-14 15:25   ` Thomas Petazzoni
2011-12-14 15:36     ` Yegor Yefremov
2011-12-14 15:42       ` Thomas Petazzoni
2011-12-19  7:25 ` [Buildroot] [PATCH v2 1/2] Python: add external modules option Arnout Vandecappelle

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