mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/python: convert setup.py to use setuptools if available
Python distutils is deprecated and is going to be removed in Python 3.12. Add support for 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 the C extension. Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Signed-off-by: Javi Merino <javi.merino@cloud.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
bbc72a7877
commit
9314a61936
2 files changed
+10
-4
No files matched your search
@@ -1,5 +1,8 @@
|
|||||||
from distutils.core import setup, Extension
|
# Prefer setuptools, fall back to distutils
|
||||||
from distutils.ccompiler import new_compiler
|
try:
|
||||||
|
from setuptools import setup, Extension
|
||||||
|
except ImportError:
|
||||||
|
from distutils.core import setup, Extension
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
|
# Prefer setuptools, fall back to distutils
|
||||||
from distutils.core import setup, Extension
|
try:
|
||||||
|
from setuptools import setup, Extension
|
||||||
|
except ImportError:
|
||||||
|
from distutils.core import setup, Extension
|
||||||
import os, sys
|
import os, sys
|
||||||
|
|
||||||
XEN_ROOT = "../.."
|
XEN_ROOT = "../.."
|
||||||
|
|||||||