From 58f698d29fa99251cd3882a3d5dba6b6bcb00cda Mon Sep 17 00:00:00 2001 From: MatthewDaggitt Date: Tue, 26 Nov 2024 15:36:55 +0800 Subject: [PATCH] Try again --- vehicle-python/setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vehicle-python/setup.py b/vehicle-python/setup.py index 72b50fc1a..96873f2d7 100644 --- a/vehicle-python/setup.py +++ b/vehicle-python/setup.py @@ -41,14 +41,15 @@ def build_extension(self, ext: setuptools.Extension) -> None: # Taken from distutils: # https://github.com/pypa/distutils/blob/4435cec31b8eb5712aa8bf993bea3f07051c24d8/distutils/command/build_ext.py#L504-L513 - if ext.sources is None or not isinstance(ext.sources, (list, tuple)): + sources = ext.sources.copy() + if sources is None or not isinstance(sources, (list, tuple)): raise distutils.errors.DistutilsSetupError( "in 'ext_modules' option (extension '%s'), " "'sources' must be present and must be " "a list of source filenames" % ext.name ) # sort to make the resulting .so file build reproducible - sources = ext.sources.copy().sort() + sources.sort() # First, scan the sources for SWIG definition files (.i), run # SWIG on 'em to create .c files, and modify the sources list