From 5456d7b107a9fe53c97f7e6502c2911de1bb5d35 Mon Sep 17 00:00:00 2001 From: Benjamin Moody Date: Fri, 2 Aug 2024 16:43:13 -0400 Subject: [PATCH] Include win_utf8_io.c when building module for Windows. This provides extra I/O shims that libFLAC requires. --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index 039ce3f..31bda79 100755 --- a/setup.py +++ b/setup.py @@ -63,6 +63,10 @@ def _flac_options(): os.path.join(pkgdir, 'src', 'libFLAC', 'include'), ] + if os.name == 'nt': + sources.append(os.path.join(pkgdir, 'src', 'share', + 'win_utf8_io', 'win_utf8_io.c')) + with open(os.path.join(pkgdir, 'CMakeLists.txt')) as f: version = re.search(r'\bproject\(FLAC\s+VERSION\s+([^\s\)]+)', f.read()).group(1)