From 91bc99ac821731fc8b594d38c0b5500f8da0819f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 3 Sep 2024 09:18:27 -0400 Subject: [PATCH] In sdist.prune_file_list, support build.build_base as a pathlib.Path. Closes pypa/setuptools#4615 --- distutils/command/sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distutils/command/sdist.py b/distutils/command/sdist.py index e8abb73920..eda6afe811 100644 --- a/distutils/command/sdist.py +++ b/distutils/command/sdist.py @@ -391,7 +391,7 @@ def prune_file_list(self): build = self.get_finalized_command('build') base_dir = self.distribution.get_fullname() - self.filelist.exclude_pattern(None, prefix=build.build_base) + self.filelist.exclude_pattern(None, prefix=os.fspath(build.build_base)) self.filelist.exclude_pattern(None, prefix=base_dir) if sys.platform == 'win32':