1from setuptools import setup, find_packages, Extension 2import glob 3import os.path 4import sys 5 6 7C_SRC_PREFIX = os.path.join('cbits', 'webrtc', 'common_audio') 8 9c_sources = ( 10 [os.path.join( 11 'cbits', 'pywebrtcvad.c')] 12 + glob.glob( 13 os.path.join( 14 C_SRC_PREFIX, 15 'signal_processing', 16 '*.c')) 17 + glob.glob( 18 os.path.join( 19 C_SRC_PREFIX, 20 'vad', 21 '*.c'))) 22 23define_macros = [] 24 25if sys.platform.startswith('win'): 26 define_macros.extend([('_WIN32', None),]) 27else: 28 define_macros.extend([('WEBRTC_POSIX', None),]) 29 30module = Extension('_webrtcvad', 31 define_macros=define_macros, 32 sources=c_sources, 33 include_dirs=['cbits']) 34 35here = os.path.abspath(os.path.dirname(__file__)) 36 37# Get the long description from the README file 38with open(os.path.join(here, 'README.rst')) as f: 39 long_description = f.read() 40 41setup( 42 name='webrtcvad', 43 author='John Wiseman', 44 author_email='jjwiseman@gmail.com', 45 version='2.0.10', 46 description=('Python interface to the Google WebRTC Voice ' 47 'Activity Detector (VAD)'), 48 long_description=long_description, 49 url='https://github.com/wiseman/py-webrtcvad', 50 license='MIT', 51 classifiers=[ 52 # How mature is this project? Common values are 53 # 3 - Alpha 54 # 4 - Beta 55 # 5 - Production/Stable 56 'Development Status :: 4 - Beta', 57 58 # Indicate who your project is intended for 59 'Intended Audience :: Developers', 60 'Topic :: Scientific/Engineering :: Artificial Intelligence', 61 'Topic :: Scientific/Engineering :: Information Analysis', 62 'Topic :: Scientific/Engineering :: Human Machine Interfaces', 63 64 # Pick your license as you wish (should match "license" above) 65 'License :: OSI Approved :: MIT License', 66 67 # Specify the Python versions you support here. In particular, 68 # ensure that you indicate whether you support Python 2, 69 # Python 3 or both. 70 'Programming Language :: Python :: 2', 71 'Programming Language :: Python :: 2.7', 72 'Programming Language :: Python :: 3', 73 'Programming Language :: Python :: 3.2', 74 'Programming Language :: Python :: 3.3', 75 'Programming Language :: Python :: 3.4', 76 'Programming Language :: Python :: 3.5', 77 ], 78 keywords='speechrecognition asr voiceactivitydetection vad webrtc', 79 ext_modules=[module], 80 py_modules=['webrtcvad'], 81 test_suite='nose.collector', 82 # List additional groups of dependencies here (e.g. development 83 # dependencies). You can install these using the following syntax, 84 # for example: $ pip install -e .[dev,test] 85 extras_require={ 86 'dev': ['nose', 'check-manifest', 'unittest2', 'zest.releaser', 87 'psutil', 'memory_profiler'] 88 }) 89