Skip to content

Commit

Permalink
Include win_utf8_io.c when building module for Windows.
Browse files Browse the repository at this point in the history
This provides extra I/O shims that libFLAC requires.
  • Loading branch information
Benjamin Moody committed Aug 2, 2024
1 parent e2abd96 commit 5456d7b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5456d7b

Please sign in to comment.