mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
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>
32 lines
869 B
Python
32 lines
869 B
Python
# Prefer setuptools, fall back to distutils
|
|
try:
|
|
from setuptools import setup, Extension
|
|
except ImportError:
|
|
from distutils.core import setup, Extension
|
|
import os
|
|
import sys
|
|
|
|
extra_compile_args = [ "-fno-strict-aliasing" ]
|
|
|
|
XEN_ROOT = "../.."
|
|
|
|
xenfsimage = Extension("xenfsimage",
|
|
extra_compile_args = extra_compile_args,
|
|
include_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ],
|
|
library_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ],
|
|
libraries = ["xenfsimage"],
|
|
sources = ["src/fsimage/fsimage.c"])
|
|
|
|
pkgs = [ 'grub' ]
|
|
|
|
setup(name='pygrub',
|
|
version='0.6',
|
|
description='Boot loader that looks a lot like grub for Xen',
|
|
author='Jeremy Katz',
|
|
author_email='katzj@redhat.com',
|
|
license='GPL',
|
|
package_dir={'grub': 'src', 'fsimage': 'src'},
|
|
packages=pkgs,
|
|
ext_modules = [ xenfsimage ]
|
|
)
|