Skip to content

Commit 0d4a9a9

Browse files
committed
enable cross-platform builds
1 parent 7a11a6f commit 0d4a9a9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

soundfile_build.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import sys
23
from cffi import FFI
34

@@ -126,9 +127,10 @@
126127
} SF_FORMAT_INFO ;
127128
""")
128129

129-
if sys.platform == 'win32':
130+
platform = os.environ.get('PYSOUNDFILE_PLATFORM', sys.platform)
131+
if platform == 'win32':
130132
ffibuilder.cdef("""
131-
SNDFILE* sf_wchar_open (LPCWSTR wpath, int mode, SF_INFO *sfinfo) ;
133+
SNDFILE* sf_wchar_open (const wchar_t *wpath, int mode, SF_INFO *sfinfo) ;
132134
""")
133135

134136
if __name__ == "__main__":

0 commit comments

Comments
 (0)