Skip to contentSkip to conversation

package/python-aenum: fix pyc compilation error

PATCH Applied yegorslists--- via buildroot 3 participants 3 messages May 2, 2022 – May 28, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/python-aenum: fix pyc compilation error

From: Yegor Yefremov <[email protected]>

_py2.py uses syntax not compatible with Python3. Remove _py2.py to avoid the following compilation error:

error: File "/usr/lib/python3.10/site-packages/aenum/_py2.py", line 5
raise exc, None, tb
^
SyntaxError: invalid syntax

---
 package/python-aenum/python-aenum.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/python-aenum/python-aenum.mk +8 -0
index 9a30211bb6..6d90a59c84 100644
@@ -11,4 +11,12 @@ PYTHON_AENUM_SETUP_TYPE = setuptools
 PYTHON_AENUM_LICENSE = BSD-3-Clause
 PYTHON_AENUM_LICENSE_FILES = aenum/LICENSE
 
+# _py2.py uses syntax not compatible with Python3.
+# Remove _py2.py to avoid compilation error.
+define PYTHON_AENUM_REMOVE_PY2_PY
+rm $(@D)/aenum/_py2.py
+endef
+
+PYTHON_AENUM_POST_EXTRACT_HOOKS = PYTHON_AENUM_REMOVE_PY2_PY
+
 $(eval $(python-package))
Signature · 6 lines
2.17.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 20 lines · yegorslists--- via buildroot

From: Yegor Yefremov <[email protected]>

_py2.py uses syntax not compatible with Python3. Remove _py2.py to avoid the following compilation error:

error: File "/usr/lib/python3.10/site-packages/aenum/_py2.py", line 5
raise exc, None, tb
^
SyntaxError: invalid syntax

---
  package/python-aenum/python-aenum.mk | 8 ++++++++
  1 file changed, 8 insertions(+)
package/python-aenum/python-aenum.mk +0 -0
index 9a30211bb6..6d90a59c84 100644

package/python-aenum/python-aenum.mk PYTHON_AENUM_SETUP_TYPE = setuptools · line 17

Quoted 7 lines
package/python-aenum/python-aenum.mk +4 -0
@@ -11,4 +11,12 @@ PYTHON_AENUM_SETUP_TYPE = setuptools
  PYTHON_AENUM_LICENSE = BSD-3-Clause
  PYTHON_AENUM_LICENSE_FILES = aenum/LICENSE
 
+# _py2.py uses syntax not compatible with Python3.
+# Remove _py2.py to avoid compilation error.
+define PYTHON_AENUM_REMOVE_PY2_PY
+rm $(@D)/aenum/_py2.py

Within define, indent with (at least) one tab.

Applied to master with that fixed, thanks.

Regards,
Arnout

package/python-aenum/python-aenum.mk PYTHON_AENUM_SETUP_TYPE = setuptools · line 22

Quoted 5 lines
package/python-aenum/python-aenum.mk +4 -0
+endef
+
+PYTHON_AENUM_POST_EXTRACT_HOOKS = PYTHON_AENUM_REMOVE_PY2_PY
+
  $(eval $(python-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to yegorslists--- via buildroot
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"yegorslists---" == yegorslists--- via buildroot <[email protected]> writes:

From: Yegor Yefremov <[email protected]> _py2.py uses syntax not compatible with Python3. Remove _py2.py to avoid the following compilation error:

Quoted 6 lines

error: File "/usr/lib/python3.10/site-packages/aenum/_py2.py", line 5
raise exc, None, tb
^
SyntaxError: invalid syntax

Committed to 2022.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot