* [Buildroot] [PATCH v2] openpgm: needs host python2
@ 2014-04-10 8:16 Baruch Siach
2014-04-11 7:09 ` Samuel Martin
0 siblings, 1 reply; 5+ messages in thread
From: Baruch Siach @ 2014-04-10 8:16 UTC (permalink / raw)
To: buildroot
When BR2_PACKAGE_PYTHON3=y host python symlinks to python3. This breaks the
version_generator.py script. Make sure we use the right host python version.
We can't use the host installed python for ac_cv_path_PYTHON, but host python
might default to python3 in the not so distant future.
Fixes:
http://autobuild.buildroot.net/results/01f/01f886a073439c0639ed93e596b68bcadf1a5824/
Cc: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
Changes v1 -> v2:
* Depend on host-python unconditionally (Samuel Martin)
* Explain in the commit log why not to use the host python
---
package/openpgm/openpgm.mk | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/package/openpgm/openpgm.mk b/package/openpgm/openpgm.mk
index 3ec5c77e28c4..a108afea903b 100644
--- a/package/openpgm/openpgm.mk
+++ b/package/openpgm/openpgm.mk
@@ -12,7 +12,10 @@ OPENPGM_LICENSE_FILES = openpgm/pgm/LICENSE
OPENPGM_INSTALL_STAGING = YES
OPENPGM_AUTORECONF = YES
OPENPGM_SUBDIR = openpgm/pgm/
+# version_generator.py needs python2
+OPENPGM_DEPENDENCIES = host-python
OPENPGM_CONF_ENV = ac_cv_file__proc_cpuinfo=yes ac_cv_file__dev_rtc=no \
- ac_cv_file__dev_hpet=no
+ ac_cv_file__dev_hpet=no \
+ ac_cv_path_PYTHON=$(HOST_DIR)/usr/bin/python2
$(eval $(autotools-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2] openpgm: needs host python2
2014-04-10 8:16 [Buildroot] [PATCH v2] openpgm: needs host python2 Baruch Siach
@ 2014-04-11 7:09 ` Samuel Martin
2014-04-12 14:02 ` Thomas Petazzoni
2014-04-14 4:24 ` Baruch Siach
0 siblings, 2 replies; 5+ messages in thread
From: Samuel Martin @ 2014-04-11 7:09 UTC (permalink / raw)
To: buildroot
Hi Baruch,
On Thu, Apr 10, 2014 at 10:16 AM, Baruch Siach <baruch@tkos.co.il> wrote:
> When BR2_PACKAGE_PYTHON3=y host python symlinks to python3. This breaks the
> version_generator.py script. Make sure we use the right host python version.
>
> We can't use the host installed python for ac_cv_path_PYTHON, but host python
> might default to python3 in the not so distant future.
>
> Fixes:
> http://autobuild.buildroot.net/results/01f/01f886a073439c0639ed93e596b68bcadf1a5824/
>
> Cc: Samuel Martin <s.martin49@gmail.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> Changes v1 -> v2:
> * Depend on host-python unconditionally (Samuel Martin)
> * Explain in the commit log why not to use the host python
> ---
> package/openpgm/openpgm.mk | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/package/openpgm/openpgm.mk b/package/openpgm/openpgm.mk
> index 3ec5c77e28c4..a108afea903b 100644
> --- a/package/openpgm/openpgm.mk
> +++ b/package/openpgm/openpgm.mk
> @@ -12,7 +12,10 @@ OPENPGM_LICENSE_FILES = openpgm/pgm/LICENSE
> OPENPGM_INSTALL_STAGING = YES
> OPENPGM_AUTORECONF = YES
> OPENPGM_SUBDIR = openpgm/pgm/
> +# version_generator.py needs python2
> +OPENPGM_DEPENDENCIES = host-python
> OPENPGM_CONF_ENV = ac_cv_file__proc_cpuinfo=yes ac_cv_file__dev_rtc=no \
> - ac_cv_file__dev_hpet=no
> + ac_cv_file__dev_hpet=no \
> + ac_cv_path_PYTHON=$(HOST_DIR)/usr/bin/python2
>
This works fine, but maybe a patch like [1] is simple enough to avoid
a hard dependency on host-python.
> $(eval $(autotools-package))
> --
> 1.9.1
>
Regards,
[1] http://pastebin.com/JJerR2uu
--
Samuel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2] openpgm: needs host python2
2014-04-11 7:09 ` Samuel Martin
@ 2014-04-12 14:02 ` Thomas Petazzoni
2014-04-14 4:24 ` Baruch Siach
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2014-04-12 14:02 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Fri, 11 Apr 2014 09:09:12 +0200, Samuel Martin wrote:
> This works fine, but maybe a patch like [1] is simple enough to avoid
> a hard dependency on host-python.
[...]
> [1] http://pastebin.com/JJerR2uu
Can you submit a proper patch for this, and also submit it upstream?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2] openpgm: needs host python2
2014-04-11 7:09 ` Samuel Martin
2014-04-12 14:02 ` Thomas Petazzoni
@ 2014-04-14 4:24 ` Baruch Siach
2014-04-14 16:04 ` Samuel Martin
1 sibling, 1 reply; 5+ messages in thread
From: Baruch Siach @ 2014-04-14 4:24 UTC (permalink / raw)
To: buildroot
Hi Samuel,
On Fri, Apr 11, 2014 at 09:09:12AM +0200, Samuel Martin wrote:
> On Thu, Apr 10, 2014 at 10:16 AM, Baruch Siach <baruch@tkos.co.il> wrote:
> > When BR2_PACKAGE_PYTHON3=y host python symlinks to python3. This breaks the
> > version_generator.py script. Make sure we use the right host python version.
> >
> > We can't use the host installed python for ac_cv_path_PYTHON, but host python
> > might default to python3 in the not so distant future.
> >
> > Fixes:
> > http://autobuild.buildroot.net/results/01f/01f886a073439c0639ed93e596b68bcadf1a5824/
> >
> > Cc: Samuel Martin <s.martin49@gmail.com>
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> > Changes v1 -> v2:
> > * Depend on host-python unconditionally (Samuel Martin)
> > * Explain in the commit log why not to use the host python
> > ---
> > package/openpgm/openpgm.mk | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/package/openpgm/openpgm.mk b/package/openpgm/openpgm.mk
> > index 3ec5c77e28c4..a108afea903b 100644
> > --- a/package/openpgm/openpgm.mk
> > +++ b/package/openpgm/openpgm.mk
> > @@ -12,7 +12,10 @@ OPENPGM_LICENSE_FILES = openpgm/pgm/LICENSE
> > OPENPGM_INSTALL_STAGING = YES
> > OPENPGM_AUTORECONF = YES
> > OPENPGM_SUBDIR = openpgm/pgm/
> > +# version_generator.py needs python2
> > +OPENPGM_DEPENDENCIES = host-python
> > OPENPGM_CONF_ENV = ac_cv_file__proc_cpuinfo=yes ac_cv_file__dev_rtc=no \
> > - ac_cv_file__dev_hpet=no
> > + ac_cv_file__dev_hpet=no \
> > + ac_cv_path_PYTHON=$(HOST_DIR)/usr/bin/python2
> >
>
> This works fine, but maybe a patch like [1] is simple enough to avoid
> a hard dependency on host-python.
The print_function feature of __future__ is only available since Python 2.6.
Should we rely on having such a recent version installed on the host?
baruch
> > $(eval $(autotools-package))
> > --
> > 1.9.1
>
> Regards,
>
> [1] http://pastebin.com/JJerR2uu
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 5+ messages in thread* [Buildroot] [PATCH v2] openpgm: needs host python2
2014-04-14 4:24 ` Baruch Siach
@ 2014-04-14 16:04 ` Samuel Martin
0 siblings, 0 replies; 5+ messages in thread
From: Samuel Martin @ 2014-04-14 16:04 UTC (permalink / raw)
To: buildroot
Hi Baruch, all,
On Mon, Apr 14, 2014 at 6:24 AM, Baruch Siach <baruch@tkos.co.il> wrote:
[...]
> The print_function feature of __future__ is only available since Python 2.6.
> Should we rely on having such a recent version installed on the host?
I think so. I don't see why a build machine would keep a python
version <2.6, maybe some very old buildfarms (in this case, one may
expect other troubles ;-]).
Anyway, I'll the host-python dependency; if this is rejected, I'll
repost the patch without.
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-14 16:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-10 8:16 [Buildroot] [PATCH v2] openpgm: needs host python2 Baruch Siach
2014-04-11 7:09 ` Samuel Martin
2014-04-12 14:02 ` Thomas Petazzoni
2014-04-14 4:24 ` Baruch Siach
2014-04-14 16:04 ` Samuel Martin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox