Skip to contentSkip to conversation

python3-astor: switch to python3

PATCH In review Yu, Mingli 2 participants 2 messages Dec 23, 2020 – Jan 4, 2021

lore
Share & tools
lore

Yu, Mingli

author
#0 lore raw

PATCH 1/1 python3-astor: switch to python3

From: Mingli Yu <[email protected]>

As python2 reached end of life(EOL), so convert rtrip.py to python3.

---
 .../0001-rtrip.py-convert-to-python3.patch    | 36 +++++++++++++++++++
 .../python/python3-astor_0.8.1.bb             |  4 ++-
 2 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-astor/0001-rtrip.py-convert-to-python3.patch
meta-python/recipes-devtools/python/python3-astor/0001-rtrip.py-convert-to-python3.patch new file +36 -0
new file mode 100644
index 000000000..009951864
@@ -0,0 +1,36 @@
+From 1a477968593a14ee9c8597c1ed4e8b61a7731e15 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <[email protected]>
+Date: Wed, 23 Dec 2020 02:23:13 +0000
+Subject: [PATCH] rtrip.py: convert to python3
+
+As Python 2 reached end of life (EOL), so convert rtrip.py to python3.
+
+Upstream-Status: Submitted [https://github.com/berkerpeksag/astor/pull/192]
+
+Signed-off-by: Mingli Yu <[email protected]>
+---
+ astor/rtrip.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/astor/rtrip.py b/astor/rtrip.py
+index 8b108e7..e2e30a6 100755
+--- a/astor/rtrip.py
++++ b/astor/rtrip.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ """
+ Part of the astor library for Python AST manipulation.
+@@ -160,7 +160,7 @@ def usage(msg):
+ 
+         Usage:
+ 
+-            python -m astor.rtrip [readonly] [<source>]
++            python3 -m astor.rtrip [readonly] [<source>]
+ 
+ 
+         This utility tests round-tripping of Python source to AST
+-- 
+2.26.2
+
meta-python/recipes-devtools/python/python3-astor_0.8.1.bb +3 -1
index 125a0236e..5048e5bec 100644
@@ -4,7 +4,9 @@ SECTION = "devel/python"
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=561205fdabc3ec52cae2d30815b8ade7"
 
-SRC_URI = "git://github.com/berkerpeksag/astor.git "
+SRC_URI = "git://github.com/berkerpeksag/astor.git \
+           file://0001-rtrip.py-convert-to-python3.patch \
+"
 SRCREV ?= "c7553c79f9222e20783fe9bd8a553f932e918072"
 
 inherit setuptools3
Signature · 1 line
2.26.2
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Mingli

From: Mingli Yu <[email protected]>

As python2 reached end of life(EOL), so convert rtrip.py to python3.

Quoted 66 lines
---
  .../0001-rtrip.py-convert-to-python3.patch    | 36 +++++++++++++++++++
  .../python/python3-astor_0.8.1.bb             |  4 ++-
  2 files changed, 39 insertions(+), 1 deletion(-)

create mode 100644 meta-python/recipes-devtools/python/python3-astor/0001-rtrip.py-convert-to-python3.patch

meta-python/recipes-devtools/python/python3-astor/0001-rtrip.py-convert-to-python3.patch new file +36 -0
new file mode 100644
index 000000000..009951864
@@ -0,0 +1,36 @@
+From 1a477968593a14ee9c8597c1ed4e8b61a7731e15 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <[email protected]>
+Date: Wed, 23 Dec 2020 02:23:13 +0000
+Subject: [PATCH] rtrip.py: convert to python3
+
+As Python 2 reached end of life (EOL), so convert rtrip.py to python3.
+
+Upstream-Status: Submitted [https://github.com/berkerpeksag/astor/pull/192]
+
+Signed-off-by: Mingli Yu <[email protected]>
+---
+ astor/rtrip.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/astor/rtrip.py b/astor/rtrip.py
+index 8b108e7..e2e30a6 100755
+--- a/astor/rtrip.py
++++ b/astor/rtrip.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ """
+ Part of the astor library for Python AST manipulation.
+@@ -160,7 +160,7 @@ def usage(msg):
+
+         Usage:
+
+-            python -m astor.rtrip [readonly] [<source>]
++            python3 -m astor.rtrip [readonly] [<source>]
+
+
+         This utility tests round-tripping of Python source to AST
+--
+2.26.2
+
meta-python/recipes-devtools/python/python3-astor_0.8.1.bb +3 -1
index 125a0236e..5048e5bec 100644
@@ -4,7 +4,9 @@ SECTION = "devel/python"
  LICENSE = "BSD-3-Clause"
  LIC_FILES_CHKSUM = "file://LICENSE;md5=561205fdabc3ec52cae2d30815b8ade7"
 
-SRC_URI = "git://github.com/berkerpeksag/astor.git "
+SRC_URI = "git://github.com/berkerpeksag/astor.git \
+           file://0001-rtrip.py-convert-to-python3.patch \
+"
  SRCREV ?= "c7553c79f9222e20783fe9bd8a553f932e918072"
 
  inherit setuptools3