Skip to contentSkip to conversation

python-numpy: Avoid installing copy of f2py script

PATCH In review Alejandro Enedino Hernandez Samaniego 4 participants 7 messages May 18, 2019 – May 21, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python-numpy: Avoid installing copy of f2py script

Both python-numpy and python3-numpy try to install the file:

${D}/${bindir}/f2py

which causes an error during do_rootfs since the package manager complains about that.

The numpy packages create basically copies of f2py script with the following names:
f2py (on both)
f2py2 (on python 2)
f2py2.7 (on python 2)
f2py3 (on python 3)
f2py3.7 (on python 3)

Remove the copy of f2py from python-numpy in favor of using the one from python3 to avoid installation issues at do_rootfs().

---
 meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb +4 -0
index 5013789..a1133da 100644
@@ -4,3 +4,7 @@ require python-numpy.inc
 RDEPENDS_${PN}_class-target_append = " \
     ${PYTHON_PN}-subprocess \
 "
+
+do_install_append(){
+        rm ${D}/${bindir}/f2py
+}
Signature · 1 line
2.7.4
#1 lore raw
Quoted 13 lines · Alejandro Enedino Hernandez Samaniego

Both python-numpy and python3-numpy try to install the file:

${D}/${bindir}/f2py

which causes an error during do_rootfs since the package manager complains about that.

The numpy packages create basically copies of f2py script with the following names:
f2py (on both)
f2py2 (on python 2)
f2py2.7 (on python 2)
f2py3 (on python 3)
f2py3.7 (on python 3)

Quoted 3 lines

Remove the copy of f2py from python-numpy in favor of using the one from python3 to avoid installation issues at do_rootfs().

what if one does not install py3 ?

Quoted 18 lines
---
  meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb | 4 ++++
  1 file changed, 4 insertions(+)
meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb +4 -0
index 5013789..a1133da 100644
@@ -4,3 +4,7 @@ require python-numpy.inc
  RDEPENDS_${PN}_class-target_append = " \
      ${PYTHON_PN}-subprocess \
  "
+
+do_install_append(){
+        rm ${D}/${bindir}/f2py
+}
#2 lore raw

Hey Khem,

Quoted 16 lines · Khem Raj
Quoted 13 lines · Alejandro Enedino Hernandez Samaniego

Both python-numpy and python3-numpy try to install the file:

${D}/${bindir}/f2py

which causes an error during do_rootfs since the package manager complains about that.

The numpy packages create basically copies of f2py script with the following names:
f2py (on both)
f2py2 (on python 2)
f2py2.7 (on python 2)
f2py3 (on python 3)
f2py3.7 (on python 3)

Quoted 5 lines
Quoted 3 lines

Remove the copy of f2py from python-numpy in favor of using the one from python3 to avoid installation issues at do_rootfs().

what if one does not install py3 ?

If you only install py2, you could still execute f2py2 or f2py2.7, I'm simply

favoring the py3 installation by default but it should be mostly harmless

since there's still two other copies of the script with different names.

Cheers,

Alejandro

Quoted 19 lines
Quoted 19 lines

---
  meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb | 4 ++++

  1 file changed, 4 insertions(+)
meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb +0 -0
index 5013789..a1133da 100644
@@ -4,3 +4,7 @@ require python-numpy.inc
   RDEPENDS_${PN}_class-target_append = " \
       ${PYTHON_PN}-subprocess \

  "

meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb +4 -0
+
+do_install_append(){
+        rm ${D}/${bindir}/f2py
+}
#3 lore raw
Quoted 30 lines · Alejandro Enedino Hernandez Samaniego

Hey Khem,

Quoted 18 lines · Khem Raj
Quoted 15 lines · Alejandro Enedino Hernandez Samaniego

Both python-numpy and python3-numpy try to install the file:

${D}/${bindir}/f2py

which causes an error during do_rootfs since the package manager complains about that.

The numpy packages create basically copies of f2py script with the following names:
f2py (on both)
f2py2 (on python 2)
f2py2.7 (on python 2)
f2py3 (on python 3)
f2py3.7 (on python 3)

Quoted 6 lines
Quoted 4 lines

Remove the copy of f2py from python-numpy in favor of using the one from python3
to avoid installation issues at do_rootfs().

what if one does not install py3 ?

Quoted 6 lines

If you only install py2, you could still execute f2py2 or f2py2.7, I'm simply

favoring the py3 installation by default but it should be mostly harmless

since there's still two other copies of the script with different names.

I think it should be such that it’s used from py2 if py3 is not installed since otherwise it might break scripts

Quoted 29 lines

Cheers,

Alejandro

Quoted 22 lines
Quoted 22 lines

Signed-off-by: Alejandro Enedino Hernandez Samaniego <[email protected]>

---
  meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb b/meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb index 5013789..a1133da 100644

meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb +4 -0
@@ -4,3 +4,7 @@ require python-numpy.inc
  RDEPENDS_${PN}_class-target_append = " \
      ${PYTHON_PN}-subprocess \
  "
+
+do_install_append(){
+        rm ${D}/${bindir}/f2py
+}
#4 lore raw
Quoted 39 lines · Khem Raj
Quoted 37 lines · Alejandro Enedino Hernandez Samaniego

Hey Khem,

Quoted 8 lines · Khem Raj
Quoted 5 lines · Alejandro Enedino Hernandez Samaniego

Both python-numpy and python3-numpy try to install the file:

${D}/${bindir}/f2py

which causes an error during do_rootfs since the package

manager

Quoted 3 lines
Quoted 3 lines

complains about that.

The numpy packages create basically copies of f2py script with

the

Quoted 8 lines
Quoted 8 lines

following names:
f2py (on both)
f2py2 (on python 2)
f2py2.7 (on python 2)
f2py3 (on python 3)
f2py3.7 (on python 3)

Remove the copy of f2py from python-numpy in favor of using the

one

Quoted 5 lines
Quoted 3 lines

from python3
to avoid installation issues at do_rootfs().

what if one does not install py3 ?

If you only install py2, you could still execute f2py2 or f2py2.7, I'm
simply

Quoted 8 lines
Quoted 5 lines

favoring the py3 installation by default but it should be mostly harmless

since there's still two other copies of the script with different names.

I think it should be such that it’s used from py2 if py3 is not installed since otherwise it might break scripts

Given we're strongly favouring py3 now, I'd hope there aren't many such users and if there are, this might encourage them to move to py3? I'm not too worried about the lack of a py2 case for this as do we really want to add the complexity?

If there are a load of py2 users and this will break things for them, fine but are there such users?

Cheers,

Richard

#5 lore raw
Quoted 49 lines · Richard Purdie
Quoted 39 lines · Khem Raj
Quoted 37 lines · Alejandro Enedino Hernandez Samaniego

Hey Khem,

Quoted 8 lines · Khem Raj
Quoted 5 lines · Alejandro Enedino Hernandez Samaniego

Both python-numpy and python3-numpy try to install the file:

${D}/${bindir}/f2py

which causes an error during do_rootfs since the package

manager

Quoted 3 lines
Quoted 3 lines

complains about that.

The numpy packages create basically copies of f2py script with

the

Quoted 8 lines
Quoted 8 lines

following names:
f2py (on both)
f2py2 (on python 2)
f2py2.7 (on python 2)
f2py3 (on python 3)
f2py3.7 (on python 3)

Remove the copy of f2py from python-numpy in favor of using the

one

Quoted 5 lines
Quoted 3 lines

from python3
to avoid installation issues at do_rootfs().

what if one does not install py3 ?

If you only install py2, you could still execute f2py2 or f2py2.7, I'm
simply

Quoted 8 lines
Quoted 5 lines

favoring the py3 installation by default but it should be mostly harmless

since there's still two other copies of the script with different names.

I think it should be such that it’s used from py2 if py3 is not installed since otherwise it might break scripts

Quoted 7 lines

Given we're strongly favouring py3 now, I'd hope there aren't many such users and if there are, this might encourage them to move to py3? I'm not too worried about the lack of a py2 case for this as do we really want to add the complexity?

If there are a load of py2 users and this will break things for them, fine but are there such users?

Yes I know people using py2 only but then they might not be using this utility specifically so it might be okay to ignore it for now

Quoted 7 lines

Cheers,

Richard

#6 lore raw
In reply to Khem Raj
Quoted 36 lines · Khem Raj
Quoted 33 lines · Alejandro Enedino Hernandez Samaniego

Hey Khem,

Quoted 18 lines · Khem Raj
Quoted 15 lines · Alejandro Enedino Hernandez Samaniego

Both python-numpy and python3-numpy try to install the file:

${D}/${bindir}/f2py

which causes an error during do_rootfs since the package manager complains about that.

The numpy packages create basically copies of f2py script with the following names:
f2py (on both)
f2py2 (on python 2)
f2py2.7 (on python 2)
f2py3 (on python 3)
f2py3.7 (on python 3)

Quoted 6 lines
Quoted 4 lines

Remove the copy of f2py from python-numpy in favor of using the one from python3
to avoid installation issues at do_rootfs().

what if one does not install py3 ?

If you only install py2, you could still execute f2py2 or f2py2.7, I'm simply

Quoted 7 lines
Quoted 3 lines

favoring the py3 installation by default but it should be mostly harmless

since there's still two other copies of the script with different names.

I think it should be such that it’s used from py2 if py3 is not installed since otherwise it might break scripts

I don't think working on python2 issues is that important for the general OpenEmbedded case. Should be left to people that stubbornly cling to python2.

https://python3statement.org/

numpy will not support Python2 after year end.

Philip

Quoted 33 lines
Quoted 30 lines

Cheers,

Alejandro

Quoted 22 lines
Quoted 22 lines

Signed-off-by: Alejandro Enedino Hernandez Samaniego <[email protected]>

---
  meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb b/meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb index 5013789..a1133da 100644

meta/recipes-devtools/python-numpy/python-numpy_1.16.3.bb +4 -0
@@ -4,3 +4,7 @@ require python-numpy.inc
  RDEPENDS_${PN}_class-target_append = " \
      ${PYTHON_PN}-subprocess \
  "
+
+do_install_append(){
+        rm ${D}/${bindir}/f2py
+}