Skip to content

Commit 433e759

Browse files
committed
adds build script for wheels and source distribution
1 parent 0d4a9a9 commit 433e759

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

build_wheels.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import os
2+
import shutil
3+
4+
architectures = dict(darwin=['64bit'],
5+
win32=['32bit', '64bit'],
6+
noplatform='noarch')
7+
8+
def cleanup():
9+
shutil.rmtree('build', ignore_errors=True)
10+
try:
11+
os.remove('_soundfile.py')
12+
except:
13+
pass
14+
15+
for platform, archs in architectures.items():
16+
os.environ['PYSOUNDFILE_PLATFORM'] = platform
17+
for arch in archs:
18+
os.environ['PYSOUNDFILE_ARCHITECTURE'] = arch
19+
cleanup()
20+
os.system('python setup.py bdist_wheel')
21+
22+
cleanup()
23+
os.system('python setup.py sdist')

0 commit comments

Comments
 (0)