* [ptxdist] [PATCH 1/2] host-cython: add new package @ 2014-03-13 13:06 Alexander Aring 2014-03-13 13:06 ` [ptxdist] [PATCH 2/2] pyzmq: " Alexander Aring 2014-03-21 9:00 ` [ptxdist] [PATCH 1/2] host-cython: " Michael Olbrich 0 siblings, 2 replies; 6+ messages in thread From: Alexander Aring @ 2014-03-13 13:06 UTC (permalink / raw) To: ptxdist; +Cc: Alexander Aring Signed-off-by: Alexander Aring <alex.aring@gmail.com> --- Hi, I am not sure about the following points: i) helptext: it's a host package with noprompt, but I saw a helptext in host-python also. That's why I add a help text here. ii) Cython installs some site-packages which is needed by $(CROSS_PYTHON). I install things in --root=$(PTXCONF_SYSROOT_TARGET) because $(CROSS_PYTHON) used this as site-packages search path. rules/host-cython.in | 10 ++++++++++ rules/host-cython.make | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 rules/host-cython.in create mode 100644 rules/host-cython.make diff --git a/rules/host-cython.in b/rules/host-cython.in new file mode 100644 index 0000000..80a989f --- /dev/null +++ b/rules/host-cython.in @@ -0,0 +1,10 @@ +## SECTION=hosttools_noprompt + +config HOST_CYTHON + tristate + select HOST_PYTHON + help + Cython is an optimising static compiler for both the Python + programming language and the extended Cython programming language + (based on Pyrex). It makes writing C extensions for Python as easy + as Python itself. diff --git a/rules/host-cython.make b/rules/host-cython.make new file mode 100644 index 0000000..5b345a8 --- /dev/null +++ b/rules/host-cython.make @@ -0,0 +1,51 @@ +# -*-makefile-*- +# +# Copyright (C) 2014 by Alexander Aring <aar@pengutronix.de> +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +HOST_PACKAGES-$(PTXCONF_HOST_CYTHON) += host-cython + +# +# Paths and names +# +HOST_CYTHON_VERSION := 0.20.1 +HOST_CYTHON_MD5 := 52431696c64e618036537c4d9aa79d99 +HOST_CYTHON := Cython-$(HOST_CYTHON_VERSION) +HOST_CYTHON_SUFFIX := tar.gz +HOST_CYTHON_URL := http://cython.org/release/$(HOST_CYTHON).$(HOST_CYTHON_SUFFIX) +HOST_CYTHON_SOURCE := $(SRCDIR)/$(HOST_CYTHON).$(HOST_CYTHON_SUFFIX) +HOST_CYTHON_DIR := $(HOST_BUILDDIR)/$(HOST_CYTHON) +HOST_CYTHON_LICENSE := APLv2 + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +HOST_CYTHON_PATH := PATH=$(HOST_PATH) +HOST_CYTHON_CONF_TOOL := NO + +$(STATEDIR)/host-cython.compile: + @$(call targetinfo) + @cd $(HOST_CYTHON_DIR) && \ + python2 setup.py build + @$(call touch) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/host-cython.install: + @$(call targetinfo) + @cd $(HOST_CYTHON_DIR) && \ + python2 setup.py install --root=$(PTXCONF_SYSROOT_TARGET) --prefix="/usr" + @$(call touch) + +# vim: syntax=make -- 1.9.0 -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 6+ messages in thread
* [ptxdist] [PATCH 2/2] pyzmq: add new package 2014-03-13 13:06 [ptxdist] [PATCH 1/2] host-cython: add new package Alexander Aring @ 2014-03-13 13:06 ` Alexander Aring 2014-03-21 9:00 ` [ptxdist] [PATCH 1/2] host-cython: " Michael Olbrich 1 sibling, 0 replies; 6+ messages in thread From: Alexander Aring @ 2014-03-13 13:06 UTC (permalink / raw) To: ptxdist; +Cc: Alexander Aring Signed-off-by: Alexander Aring <alex.aring@gmail.com> --- rules/pyzmq.in | 11 ++++++++ rules/pyzmq.make | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 rules/pyzmq.in create mode 100644 rules/pyzmq.make diff --git a/rules/pyzmq.in b/rules/pyzmq.in new file mode 100644 index 0000000..322f743 --- /dev/null +++ b/rules/pyzmq.in @@ -0,0 +1,11 @@ +## SECTION=python + +config PYZMQ + tristate + prompt "pyzmq" + select LIBZMQ + select HOST_CYTHON + select PYTHON + help + PyZMQ is the official Python binding for the ZeroMQ Messaging Library + (http://www.zeromq.org). diff --git a/rules/pyzmq.make b/rules/pyzmq.make new file mode 100644 index 0000000..0e9fa07 --- /dev/null +++ b/rules/pyzmq.make @@ -0,0 +1,83 @@ +# -*-makefile-*- +# +# Copyright (C) 2014 by Alexander Aring <aar@pengutronix.de> +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_PYZMQ) += pyzmq + +# +# Paths and names +# +PYZMQ_VERSION := 14.1.0 +PYZMQ_MD5 := 174901a85e4574629d4e586b5d37acc4 +PYZMQ := pyzmq-$(PYZMQ_VERSION) +PYZMQ_SUFFIX := tar.gz +PYZMQ_URL := https://pypi.python.org/packages/source/p/pyzmq/$(PYZMQ).$(PYZMQ_SUFFIX) +PYZMQ_SOURCE := $(SRCDIR)/$(PYZMQ).$(PYZMQ_SUFFIX) +PYZMQ_DIR := $(BUILDDIR)/$(PYZMQ) +PYZMQ_LICENSE := BSD + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +PYZMQ_CONF_TOOL := NO + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +$(STATEDIR)/pyzmq.compile: + @$(call targetinfo) + cd $(PYZMQ_DIR) && \ + $(CROSS_ENV) $(CROSS_PYTHON) \ + setup.py build --zmq=bundled + @$(call touch) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/pyzmq.install: + @$(call targetinfo) + @cd $(PYZMQ_DIR) && \ + $(CROSS_ENV) $(CROSS_PYTHON) \ + setup.py install --root=$(PYZMQ_PKGDIR) --prefix=/usr + @$(call touch) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/pyzmq.targetinstall: + @$(call targetinfo) + + @$(call install_init, pyzmq) + @$(call install_fixup, pyzmq,PRIORITY,optional) + @$(call install_fixup, pyzmq,SECTION,base) + @$(call install_fixup, pyzmq,AUTHOR,"Alexander Aring <aar@pengutronix.de>") + @$(call install_fixup, pyzmq,DESCRIPTION,missing) + + @for file in $(shell cd $(PYZMQ_PKGDIR) && find . -name "*.pyc"); \ + do \ + $(call install_copy, pyzmq, 0, 0, 0644, -, /$$file); \ + done + + @for file in $(shell cd $(PYZMQ_PKGDIR) && find . -name "*.so"); \ + do \ + $(call install_copy, pyzmq, 0, 0, 0755, -, /$$file); \ + done + + @$(call install_finish, pyzmq) + + @$(call touch) + +# vim: syntax=make -- 1.9.0 -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] [PATCH 1/2] host-cython: add new package 2014-03-13 13:06 [ptxdist] [PATCH 1/2] host-cython: add new package Alexander Aring 2014-03-13 13:06 ` [ptxdist] [PATCH 2/2] pyzmq: " Alexander Aring @ 2014-03-21 9:00 ` Michael Olbrich 2014-03-21 9:32 ` Alexander Aring 1 sibling, 1 reply; 6+ messages in thread From: Michael Olbrich @ 2014-03-21 9:00 UTC (permalink / raw) To: ptxdist On Thu, Mar 13, 2014 at 02:06:44PM +0100, Alexander Aring wrote: > Signed-off-by: Alexander Aring <alex.aring@gmail.com> > --- > Hi, > > I am not sure about the following points: > > i) helptext: it's a host package with noprompt, but I saw a helptext in > host-python also. That's why I add a help text here. > > ii) Cython installs some site-packages which is needed by $(CROSS_PYTHON). I > install things in --root=$(PTXCONF_SYSROOT_TARGET) because $(CROSS_PYTHON) > used this as site-packages search path. Both patches applied. I changed this to "--root=$(HOST_CYTHON_PKGDIR)" and --prefix=. This way 'cython' runs just fine. I'm not sure anything else is needed. 'pyzmq' builds without error even if cython is not installed here. Please test. Michael > rules/host-cython.in | 10 ++++++++++ > rules/host-cython.make | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 61 insertions(+) > create mode 100644 rules/host-cython.in > create mode 100644 rules/host-cython.make > > diff --git a/rules/host-cython.in b/rules/host-cython.in > new file mode 100644 > index 0000000..80a989f > --- /dev/null > +++ b/rules/host-cython.in > @@ -0,0 +1,10 @@ > +## SECTION=hosttools_noprompt > + > +config HOST_CYTHON > + tristate > + select HOST_PYTHON > + help > + Cython is an optimising static compiler for both the Python > + programming language and the extended Cython programming language > + (based on Pyrex). It makes writing C extensions for Python as easy > + as Python itself. > diff --git a/rules/host-cython.make b/rules/host-cython.make > new file mode 100644 > index 0000000..5b345a8 > --- /dev/null > +++ b/rules/host-cython.make > @@ -0,0 +1,51 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2014 by Alexander Aring <aar@pengutronix.de> > +# > +# See CREDITS for details about who has contributed to this project. > +# > +# For further information about the PTXdist project and license conditions > +# see the README file. > +# > + > +# > +# We provide this package > +# > +HOST_PACKAGES-$(PTXCONF_HOST_CYTHON) += host-cython > + > +# > +# Paths and names > +# > +HOST_CYTHON_VERSION := 0.20.1 > +HOST_CYTHON_MD5 := 52431696c64e618036537c4d9aa79d99 > +HOST_CYTHON := Cython-$(HOST_CYTHON_VERSION) > +HOST_CYTHON_SUFFIX := tar.gz > +HOST_CYTHON_URL := http://cython.org/release/$(HOST_CYTHON).$(HOST_CYTHON_SUFFIX) > +HOST_CYTHON_SOURCE := $(SRCDIR)/$(HOST_CYTHON).$(HOST_CYTHON_SUFFIX) > +HOST_CYTHON_DIR := $(HOST_BUILDDIR)/$(HOST_CYTHON) > +HOST_CYTHON_LICENSE := APLv2 > + > +# ---------------------------------------------------------------------------- > +# Prepare > +# ---------------------------------------------------------------------------- > + > +HOST_CYTHON_PATH := PATH=$(HOST_PATH) > +HOST_CYTHON_CONF_TOOL := NO > + > +$(STATEDIR)/host-cython.compile: > + @$(call targetinfo) > + @cd $(HOST_CYTHON_DIR) && \ > + python2 setup.py build > + @$(call touch) > + > +# ---------------------------------------------------------------------------- > +# Install > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/host-cython.install: > + @$(call targetinfo) > + @cd $(HOST_CYTHON_DIR) && \ > + python2 setup.py install --root=$(PTXCONF_SYSROOT_TARGET) --prefix="/usr" > + @$(call touch) > + > +# vim: syntax=make > -- > 1.9.0 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] [PATCH 1/2] host-cython: add new package 2014-03-21 9:00 ` [ptxdist] [PATCH 1/2] host-cython: " Michael Olbrich @ 2014-03-21 9:32 ` Alexander Aring 2014-03-21 10:05 ` Alexander Aring 0 siblings, 1 reply; 6+ messages in thread From: Alexander Aring @ 2014-03-21 9:32 UTC (permalink / raw) To: ptxdist On Fri, Mar 21, 2014 at 10:00:55AM +0100, Michael Olbrich wrote: > On Thu, Mar 13, 2014 at 02:06:44PM +0100, Alexander Aring wrote: > > Signed-off-by: Alexander Aring <alex.aring@gmail.com> > > --- > > Hi, > > > > I am not sure about the following points: > > > > i) helptext: it's a host package with noprompt, but I saw a helptext in > > host-python also. That's why I add a help text here. > > > > ii) Cython installs some site-packages which is needed by $(CROSS_PYTHON). I > > install things in --root=$(PTXCONF_SYSROOT_TARGET) because $(CROSS_PYTHON) > > used this as site-packages search path. > > Both patches applied. > > I changed this to "--root=$(HOST_CYTHON_PKGDIR)" and --prefix=. This way > 'cython' runs just fine. I'm not sure anything else is needed. 'pyzmq' > builds without error even if cython is not installed here. Please test. > I read too fast the README on github. Cython is only needed if we build from git repository but I need cython for other packages. I will test if this still works. Thanks Michael. - Alex -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] [PATCH 1/2] host-cython: add new package 2014-03-21 9:32 ` Alexander Aring @ 2014-03-21 10:05 ` Alexander Aring 2014-03-21 12:21 ` Alexander Aring 0 siblings, 1 reply; 6+ messages in thread From: Alexander Aring @ 2014-03-21 10:05 UTC (permalink / raw) To: ptxdist Hi Michael, On Fri, Mar 21, 2014 at 10:32:00AM +0100, Alexander Aring wrote: > On Fri, Mar 21, 2014 at 10:00:55AM +0100, Michael Olbrich wrote: > > On Thu, Mar 13, 2014 at 02:06:44PM +0100, Alexander Aring wrote: > > > Signed-off-by: Alexander Aring <alex.aring@gmail.com> > > > --- > > > Hi, > > > > > > I am not sure about the following points: > > > > > > i) helptext: it's a host package with noprompt, but I saw a helptext in > > > host-python also. That's why I add a help text here. > > > > > > ii) Cython installs some site-packages which is needed by $(CROSS_PYTHON). I > > > install things in --root=$(PTXCONF_SYSROOT_TARGET) because $(CROSS_PYTHON) > > > used this as site-packages search path. > > > > Both patches applied. > > > > I changed this to "--root=$(HOST_CYTHON_PKGDIR)" and --prefix=. This way > > 'cython' runs just fine. I'm not sure anything else is needed. 'pyzmq' > > builds without error even if cython is not installed here. Please test. > > > > I read too fast the README on github. Cython is only needed if we build > from git repository but I need cython for other packages. I will test if > this still works. Thanks Michael. Now I understand a little bit more. I installed it into PTXCONF_SYSROOT_TARGET because CROSS_PYTHON has the default site-packages search path there. I know this was wrong because it is a host tool which should installed into PTXCONF_SYSROOT_HOST. I always search a way to change the default site-packages search path and now I found it! [1] Your solution to install it into HOST_CYTHON_PKGDIR will install Cython into PTXCONF_SYSROOT_HOST which is correct, but then it doesn't work out of the box, because CROSS_PYTHON doesn't search in PTXCONF_SYSROOT_HOST. With solution of [1] I can change the site-packages search path with: "$(CROSS_ENV) PYTHONUSERBASE=$(PTXCONF_SYSROOT_HOST) $(CROSS_PYTHON)" and then it works with a installed Cython in PTXCONF_SYSROOT_HOST. Please let me know if this is okay for you, maybe we can put this into the default $(CROSS_PYTHON) path. It seems Cython is some special thing, we need it only at compiletime and it have some cross compiled things in there. I don't know what happens if we set PYTHONUSERBASE and python uses still his default site-packages path or not. - Alex [1] http://pymotw.com/2/site/ -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] [PATCH 1/2] host-cython: add new package 2014-03-21 10:05 ` Alexander Aring @ 2014-03-21 12:21 ` Alexander Aring 0 siblings, 0 replies; 6+ messages in thread From: Alexander Aring @ 2014-03-21 12:21 UTC (permalink / raw) To: ptxdist On Fri, Mar 21, 2014 at 11:05:01AM +0100, Alexander Aring wrote: > Hi Michael, > > On Fri, Mar 21, 2014 at 10:32:00AM +0100, Alexander Aring wrote: > > On Fri, Mar 21, 2014 at 10:00:55AM +0100, Michael Olbrich wrote: > > > On Thu, Mar 13, 2014 at 02:06:44PM +0100, Alexander Aring wrote: > > > > Signed-off-by: Alexander Aring <alex.aring@gmail.com> > > > > --- > > > > Hi, > > > > > > > > I am not sure about the following points: > > > > > > > > i) helptext: it's a host package with noprompt, but I saw a helptext in > > > > host-python also. That's why I add a help text here. > > > > > > > > ii) Cython installs some site-packages which is needed by $(CROSS_PYTHON). I > > > > install things in --root=$(PTXCONF_SYSROOT_TARGET) because $(CROSS_PYTHON) > > > > used this as site-packages search path. > > > > > > Both patches applied. > > > > > > I changed this to "--root=$(HOST_CYTHON_PKGDIR)" and --prefix=. This way > > > 'cython' runs just fine. I'm not sure anything else is needed. 'pyzmq' > > > builds without error even if cython is not installed here. Please test. > > > > > > > I read too fast the README on github. Cython is only needed if we build > > from git repository but I need cython for other packages. I will test if > > this still works. Thanks Michael. > > Now I understand a little bit more. I installed it into > PTXCONF_SYSROOT_TARGET because CROSS_PYTHON has the default > site-packages search path there. > > I know this was wrong because it is a host tool which should installed > into PTXCONF_SYSROOT_HOST. I always search a way to change the default > site-packages search path and now I found it! [1] > > Your solution to install it into HOST_CYTHON_PKGDIR will install Cython > into PTXCONF_SYSROOT_HOST which is correct, but then it doesn't work out > of the box, because CROSS_PYTHON doesn't search in PTXCONF_SYSROOT_HOST. > > With solution of [1] I can change the site-packages search path with: > > "$(CROSS_ENV) PYTHONUSERBASE=$(PTXCONF_SYSROOT_HOST) $(CROSS_PYTHON)" > > and then it works with a installed Cython in PTXCONF_SYSROOT_HOST. > Please let me know if this is okay for you, maybe we can put this into > the default $(CROSS_PYTHON) path. It seems Cython is some special thing, > we need it only at compiletime and it have some cross compiled things in > there. I don't know what happens if we set PYTHONUSERBASE and python > uses still his default site-packages path or not. > mhh, or we introduce a $(CROSS_CYTHON) (note the C instead P) which is a: "PYTHONUSERBASE=$(PTXCONF_SYSROOT_HOST) $(CROSS_PYTHON)" call. - Alex -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-03-21 12:21 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-03-13 13:06 [ptxdist] [PATCH 1/2] host-cython: add new package Alexander Aring 2014-03-13 13:06 ` [ptxdist] [PATCH 2/2] pyzmq: " Alexander Aring 2014-03-21 9:00 ` [ptxdist] [PATCH 1/2] host-cython: " Michael Olbrich 2014-03-21 9:32 ` Alexander Aring 2014-03-21 10:05 ` Alexander Aring 2014-03-21 12:21 ` Alexander Aring
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox