diff options
| author | Gary Scavone <gary@music.mcgill.ca> | 2011-04-13 00:50:38 +0000 |
|---|---|---|
| committer | Stephen Sinclair <sinclair@music.mcgill.ca> | 2013-10-11 01:38:27 +0200 |
| commit | 6faf4336eb5952b141e1c239d194f5cd70f0a885 (patch) | |
| tree | 0138f26b95005b27ecc888e0c2dacf5f7ffe09b5 /contrib/python/pyrtaudio/setup.py | |
| parent | 24a98a1971301e582dc56ef2c6ac94c342b674dd (diff) | |
Updates for release 4.0.8, including new python binding, new teststops.cpp program, ALSA "default" flag, and various changes to stopping behavior (GS).
Diffstat (limited to 'contrib/python/pyrtaudio/setup.py')
| -rw-r--r-- | contrib/python/pyrtaudio/setup.py | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/contrib/python/pyrtaudio/setup.py b/contrib/python/pyrtaudio/setup.py new file mode 100644 index 0000000..6ad0d4a --- /dev/null +++ b/contrib/python/pyrtaudio/setup.py @@ -0,0 +1,58 @@ +#!/bin/env python + +import os +from distutils.core import setup, Extension + +if hasattr(os, 'uname'): + OSNAME = os.uname()[0] +else: + OSNAME = 'Windows' + + +define_macros = [] +libraries = [] +extra_link_args = [] +extra_compile_args = ['-I../../../'] +sources = ['rtaudiomodule.cpp', '../../../RtAudio.cpp'] + + +if OSNAME == 'Linux': + define_macros=[("__LINUX_ALSA__", ''), + ('__LINUX_JACK__', ''), + ('__LINUX_OSS__', '')] + libraries = ['asound', 'jack', 'pthread'] + +elif OSNAME == 'Darwin': + define_macros = [('__MACOSX_CORE__', '')] + libraries = ['pthread', 'stdc++'] + extra_link_args = ['-framework', 'CoreAudio'] + +elif OSNAME == 'Windows': + define_macros = [('__WINDOWS_DS__', None), + ('__WINDOWS_ASIO__', None), + ('__LITTLE_ENDIAN__',None), + ('WIN32',None)] + libraries = ['winmm', 'dsound', 'Advapi32','Ole32','User32'] + sources += ['../../../include/asio.cpp', + '../../../include/asiodrivers.cpp', + '../../../include/asiolist.cpp', + '../../../include/iasiothiscallresolver.cpp'] + extra_compile_args.append('-I../../../include/') + extra_compile_args.append('-EHsc') + + + +audio = Extension('rtaudio', + sources=sources, + libraries=libraries, + define_macros=define_macros, + extra_compile_args = extra_compile_args, + extra_link_args = extra_link_args, + ) + + +setup(name = 'rtaudio', + version = '0.1', + description = 'Python RtAudio interface', + ext_modules = [audio]) + |
