Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] New package: python-setuptools
@ 2011-12-21 10:52 yegorslists at googlemail.com
  2011-12-21 10:58 ` Yegor Yefremov
  2011-12-21 12:42 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: yegorslists at googlemail.com @ 2011-12-21 10:52 UTC (permalink / raw)
  To: buildroot

From: Yegor Yefremov <yegorslists@googlemail.com>

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 package/python-setuptools/Config.in            |    9 +++++++++
 package/python-setuptools/python-setuptools.mk |   24 ++++++++++++++++++++++++
 package/python/Config.in                       |    2 ++
 3 files changed, 35 insertions(+), 0 deletions(-)
 create mode 100644 package/python-setuptools/Config.in
 create mode 100644 package/python-setuptools/python-setuptools.mk

diff --git a/package/python-setuptools/Config.in b/package/python-setuptools/Config.in
new file mode 100644
index 0000000..365470e
--- /dev/null
+++ b/package/python-setuptools/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_PYTHON_SETUPTOOLS
+	bool "python-setuptools"
+	depends on BR2_PACKAGE_PYTHON
+	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..1103717
--- /dev/null
+++ b/package/python-setuptools/python-setuptools.mk
@@ -0,0 +1,24 @@
+#############################################################
+#
+# 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_INSTALL_STAGING = YES
+PYTHON_SETUPTOOLS_DEPENDENCIES = python
+
+define HOST_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/python2.7/site-packages"\
+	$(HOST_DIR)/usr/bin/python setup.py install --prefix=$(HOST_DIR)/usr)
+endef
+
+$(eval $(call GENTARGETS))
+$(eval $(call GENTARGETS,host))
+
diff --git a/package/python/Config.in b/package/python/Config.in
index 11aa267..c48496a 100644
--- a/package/python/Config.in
+++ b/package/python/Config.in
@@ -93,6 +93,8 @@ config BR2_PACKAGE_PYTHON_ZLIB
 	help
 	  zlib support in Python
 
+source "package/python-setuptools/Config.in"
+
 endmenu
 
 endif
-- 
1.7.1.1

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

* [Buildroot] [PATCH] New package: python-setuptools
  2011-12-21 10:52 [Buildroot] [PATCH] New package: python-setuptools yegorslists at googlemail.com
@ 2011-12-21 10:58 ` Yegor Yefremov
  2011-12-21 12:38   ` Thomas Petazzoni
  2011-12-21 12:42 ` Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Yegor Yefremov @ 2011-12-21 10:58 UTC (permalink / raw)
  To: buildroot

On Wed, Dec 21, 2011 at 11:52 AM,  <yegorslists@googlemail.com> wrote:
> From: Yegor Yefremov <yegorslists@googlemail.com>
>
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> ---
> ?package/python-setuptools/Config.in ? ? ? ? ? ?| ? ?9 +++++++++
> ?package/python-setuptools/python-setuptools.mk | ? 24 ++++++++++++++++++++++++
> ?package/python/Config.in ? ? ? ? ? ? ? ? ? ? ? | ? ?2 ++
> ?3 files changed, 35 insertions(+), 0 deletions(-)
> ?create mode 100644 package/python-setuptools/Config.in
> ?create mode 100644 package/python-setuptools/python-setuptools.mk
>
> diff --git a/package/python-setuptools/Config.in b/package/python-setuptools/Config.in
> new file mode 100644
> index 0000000..365470e
> --- /dev/null
> +++ b/package/python-setuptools/Config.in
> @@ -0,0 +1,9 @@
> +config BR2_PACKAGE_PYTHON_SETUPTOOLS
> + ? ? ? bool "python-setuptools"
> + ? ? ? depends on BR2_PACKAGE_PYTHON
> + ? ? ? 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..1103717
> --- /dev/null
> +++ b/package/python-setuptools/python-setuptools.mk
> @@ -0,0 +1,24 @@
> +#############################################################
> +#
> +# 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_INSTALL_STAGING = YES
> +PYTHON_SETUPTOOLS_DEPENDENCIES = python
> +
> +define HOST_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/python2.7/site-packages"\
> + ? ? ? $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(HOST_DIR)/usr)
> +endef
> +
> +$(eval $(call GENTARGETS))
> +$(eval $(call GENTARGETS,host))
> +
> diff --git a/package/python/Config.in b/package/python/Config.in
> index 11aa267..c48496a 100644
> --- a/package/python/Config.in
> +++ b/package/python/Config.in
> @@ -93,6 +93,8 @@ config BR2_PACKAGE_PYTHON_ZLIB
> ? ? ? ?help
> ? ? ? ? ?zlib support in Python
>
> +source "package/python-setuptools/Config.in"
> +
> ?endmenu
>
> ?endif
> --
> 1.7.1.1
>

I have some questions regarding host packages. How do I tell BR to
build it as host package? I've already defined
HOST_PYTHON_SETUPTOOLS_BUILD_CMDS and
HOST_PYTHON_SETUPTOOLS_INSTALL_CMDS but ir doesn't seem to matter.
What am I missing?

Do we need this package in staging and or target?

Yegor

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

* [Buildroot] [PATCH] New package: python-setuptools
  2011-12-21 10:58 ` Yegor Yefremov
@ 2011-12-21 12:38   ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2011-12-21 12:38 UTC (permalink / raw)
  To: buildroot

Le Wed, 21 Dec 2011 11:58:08 +0100,
Yegor Yefremov <yegorslists@googlemail.com> a ?crit :

> I have some questions regarding host packages. How do I tell BR to
> build it as host package?

You need to have another package that depends on host-python-setuptools.

> Do we need this package in staging and or target?

No. What you did looks good. Just create a package that depends on
host-python-setuptools.

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

* [Buildroot] [PATCH] New package: python-setuptools
  2011-12-21 10:52 [Buildroot] [PATCH] New package: python-setuptools yegorslists at googlemail.com
  2011-12-21 10:58 ` Yegor Yefremov
@ 2011-12-21 12:42 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2011-12-21 12:42 UTC (permalink / raw)
  To: buildroot

Le Wed, 21 Dec 2011 11:52:55 +0100,
yegorslists at googlemail.com a ?crit :

> +PYTHON_INSTALL_STAGING = YES

Your .mk file does not contain the build and install commands for a
target version of this package, so this line is useless.

> +PYTHON_SETUPTOOLS_DEPENDENCIES = python

Again, this won't be used since you have defined only a host variant
for your package. What you need is:

HOST_PYTHON_SETUPTOOLS_DEPENDENCIES = host-python

> +	(cd $(@D); PYTHONPATH="$(HOST_DIR)/usr/lib/python2.7/site-packages"\

Use $(PYTHON_VERSION_MAJOR) instead of hardcoding 2.7.

> +$(eval $(call GENTARGETS))

Remove this line this you haven't implemented a target variant for this
package.

> +source "package/python-setuptools/Config.in"

And remove the Config.in file altogether as you haven't implemented a
target variant for this package.

Of course, if you intend to also support building setuptools for the
target, keep the Config.in file and the $(eval $(call GENTARGETS))
line, but remember to implement the BUILD_CMDS and INSTALL_*_CMDS as
well.

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

end of thread, other threads:[~2011-12-21 12:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-21 10:52 [Buildroot] [PATCH] New package: python-setuptools yegorslists at googlemail.com
2011-12-21 10:58 ` Yegor Yefremov
2011-12-21 12:38   ` Thomas Petazzoni
2011-12-21 12:42 ` Thomas Petazzoni

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