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':