diff mbox series

[1/4] tools: convert setup.py to use setuptools

Message ID 20230316171634.320626-1-marmarek@invisiblethingslab.com (mailing list archive)
State New, archived
Headers show
Series [1/4] tools: convert setup.py to use setuptools | expand

Commit Message

Marek Marczykowski-Górecki March 16, 2023, 5:16 p.m. UTC
Python distutils is deprecated and is going to be removed in Python
3.12. Migrate to setuptools.
Setuptools in Python 3.11 complains:
SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
Keep using setup.py anyway to build C extension.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
 tools/pygrub/setup.py | 3 +--
 tools/python/setup.py | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/tools/pygrub/setup.py b/tools/pygrub/setup.py
index 0e4e3d02d372..5db743180713 100644
--- a/tools/pygrub/setup.py
+++ b/tools/pygrub/setup.py
@@ -1,5 +1,4 @@ 
-from distutils.core import setup, Extension
-from distutils.ccompiler import new_compiler
+from setuptools import setup, Extension
 import os
 import sys
 
diff --git a/tools/python/setup.py b/tools/python/setup.py
index 721a3141d7b7..7d57ccfbfffb 100644
--- a/tools/python/setup.py
+++ b/tools/python/setup.py
@@ -1,5 +1,4 @@ 
-
-from distutils.core import setup, Extension
+from setuptools import setup, Extension
 import os, sys
 
 XEN_ROOT = "../.."