Skip to contentSkip to conversation

python3-anyjson: Do not enable 2to3

PATCH New Khem Raj 1 participant 2 messages Oct 13, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 python3-anyjson: Do not enable 2to3

---
 .../0001-setup.py-Do-not-use-2to3.patch       | 29 +++++++++++++++++++
 .../python/python3-anyjson_0.3.3.bb           |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-anyjson/0001-setup.py-Do-not-use-2to3.patch
meta-python/recipes-devtools/python/python3-anyjson/0001-setup.py-Do-not-use-2to3.patch new file +29 -0
new file mode 100644
index 0000000000..2b9e6e52e8
@@ -0,0 +1,29 @@
+From 4fb61d7c621599b0db9c2c45f4243f07936c5953 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 13 Oct 2021 08:20:00 -0700
+Subject: [PATCH] setup.py: Do not use 2to3
+
+This helps compiling with setuptools 0.58+
+and it seems to compile fine with python3
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ setup.py | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 9fe4902..f2098e1 100644
+--- a/setup.py
++++ b/setup.py
+@@ -2,8 +2,6 @@ import os
+ import sys
+ 
+ extra = {}
+-if sys.version_info >= (3, 0):
+-    extra.update(use_2to3=True)
+ 
+ try:
+     from setuptools import setup, find_packages
+-- 
+2.33.0
+
meta-python/recipes-devtools/python/python3-anyjson_0.3.3.bb +1 -0
index 07cc99860d..2b8abb8b80 100644
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=989aa97e73c912a83a3c873fa11deb08"
 inherit pypi setuptools3 ptest
 
 SRC_URI += " \
+	file://0001-setup.py-Do-not-use-2to3.patch \
 	file://run-ptest \
 "
 
Signature · 1 line
2.33.0
author
#1 lore raw

PATCH 2/2 python3-pybluez: Do not set 2to3

---
 meta-python/recipes-devtools/python/python3-pybluez_0.23.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta-python/recipes-devtools/python/python3-pybluez_0.23.bb +5 -0
index e8d14416f8..cc659ea678 100644
@@ -11,8 +11,13 @@ SRC_URI[md5sum] = "afbe8429bb82d2c46a3d0f5f4f898f9d"
 SRC_URI[sha256sum] = "c8f04d2e78951eaa9de486b4d49381704e8943d0a6e6e58f55fcd7b8582e90de"
 
 PYPI_PACKAGE = "PyBluez"
+
 inherit pypi setuptools3
 
+do_configure:prepend() {
+   sed -i -e "/use_2to3=True,/d" ${S}/setup.py
+}
+
 RDEPENDS:${PN} += "\
     bluez5 \
     ${PYTHON_PN}-fcntl \
Signature · 1 line
2.33.0