aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Orling <timothy.t.orling@intel.com>2021-11-25 14:18:13 -0800
committerTim Orling <timothy.t.orling@intel.com>2021-11-25 20:16:13 -0800
commit29ca205dca70847b0ef6d4db6f70eddce2544f9a (patch)
treebb9230209c33fed768736c2f2bc10f6b555cdc27
parent2dffa5743a046fb17731e7b42215c876a3c5bee4 (diff)
recipetool/create_buildsys_python.py: less distutils
distutils is deprecated in Python 3.10 with removal in Python 3.12 (~October 2023). Replace distutils.command.build_py with setuptools.command.build_py. There is still a check which decides to inherit setuptools3 vs distutils3 that will need to be refactored when we add pyproject.toml and setup.cfg support for more modern PEP 517 packages. Once distutils3.bbclass is dropped, any recipe inheriting distutils3 will throw a parsing error. The plan is to move distutils*.bbclasses to meta-python. However if meta-python is not in bblayers, the parsing error would still occur. [YOCTO #14610] Signed-off-by: Tim Orling <timothy.t.orling@intel.com>
-rw-r--r--scripts/lib/recipetool/create_buildsys_python.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py
index 0b6b042ed1..570be7e81b 100644
--- a/scripts/lib/recipetool/create_buildsys_python.py
+++ b/scripts/lib/recipetool/create_buildsys_python.py
@@ -8,7 +8,7 @@
import ast
import codecs
import collections
-import distutils.command.build_py
+import setuptools.command.build_py
import email
import imp
import glob
@@ -459,7 +459,7 @@ class PythonRecipeHandler(RecipeHandler):
else:
package_dir = {}
- class PackageDir(distutils.command.build_py.build_py):
+ class PackageDir(setuptools.command.build_py.build_py):
def __init__(self, package_dir):
self.package_dir = package_dir