Skip to contentSkip to conversation

openpgm: needs host python2

PATCH Superseded Baruch Siach 3 participants 5 messages Apr 10, 2014 – Apr 14, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 openpgm: needs host python2

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/

---
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(-)
package/openpgm/openpgm.mk +4 -1
index 3ec5c77e28c4..a108afea903b 100644
@@ -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))
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/1 openpgm: needs host python2

Hi Baruch,

Quoted 24 lines · Baruch Siach

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/

---
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(-)
package/openpgm/openpgm.mk +0 -0
index 3ec5c77e28c4..a108afea903b 100644

package/openpgm/openpgm.mk OPENPGM_LICENSE_FILES = openpgm/pgm/LICENSE · line 20

Quoted 10 lines
package/openpgm/openpgm.mk +4 -1
@@ -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.

Quoted 4 lines
package/openpgm/openpgm.mk +0 -1
 $(eval $(autotools-package))
--

1.9.1

Regards,

[1] http://pastebin.com/JJerR2uu

Signature · 1 line
Samuel
#2 lore raw

PATCH v2 1/1 openpgm: needs host python2

Dear Samuel Martin,

Quoted 2 lines · Samuel Martin

This works fine, but maybe a patch like [1] is simple enough to avoid a hard dependency on host-python.

[...]

Quoted 1 line

[1] http://pastebin.com/JJerR2uu

Can you submit a proper patch for this, and also submit it upstream?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v2 1/1 openpgm: needs host python2

In reply to Samuel Martin

Hi Samuel,

Quoted 30 lines · Samuel Martin
Quoted 29 lines · Baruch Siach

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/

---
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(-)
package/openpgm/openpgm.mk +2 -0
index 3ec5c77e28c4..a108afea903b 100644
@@ -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
Quoted 8 lines

package/openpgm/openpgm.mk OPENPGM_LICENSE_FILES = openpgm/pgm/LICENSE · line 20

Quoted 5 lines
package/openpgm/openpgm.mk +2 -1
 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

Quoted 7 lines
Quoted 3 lines
package/openpgm/openpgm.mk +0 -1
 $(eval $(autotools-package))
--

1.9.1

Regards,

[1] http://pastebin.com/JJerR2uu

Signature · 3 lines
     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 -
#4 lore raw

PATCH v2 1/1 openpgm: needs host python2

Hi Baruch, all,

On Mon, Apr 14, 2014 at 6:24 AM, Baruch Siach <[email protected]> wrote:
[...]

Quoted 2 lines

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,

Signature · 1 line
Samuel