-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
47 lines (45 loc) · 1.66 KB
/
Copy pathsetup.py
File metadata and controls
47 lines (45 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
##############################################################################
# Copyright 2017 SoundHound, Incorporated. All rights reserved.
##############################################################################
import os
import sys
from setuptools import setup, Extension
if sys.platform.startswith('win'):
# not supported
print('windows platform not supported')
exit(0)
elif sys.platform.startswith('darwin'):
# osx
module1 = Extension("okhound",
sources=["pyOkHound.cpp"],
libraries=["PhraseSpotter"],
library_dirs=["libdir_osx"])
elif sys.platform.startswith('linux'):
if os.uname()[4].startswith("arm"):
# python
module1 = Extension("okhound",
sources=["pyOkHound.cpp"],
libraries=["PhraseSpotter"],
library_dirs=["libdir_pi"])
else:
# linux
module1 = Extension("okhound",
sources=["pyOkHound.cpp"],
libraries=["PhraseSpotter"],
library_dirs=["libdir_linux"])
else:
# unknown
print('unknown platform - could not install')
exit(0)
setup(name='OkHound',
version='0.2.1',
description="'Ok Hound' phrase spotter",
ext_modules=[module1],
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
author='Soundhound Inc.',
maintainer='Oliver Yeun',
url='https://github.com/oyeun/okhound',
download_url='https://github.com/oyeun/okhound/archive/0.2.1.tar.gz',
keywords=['OkHound']
)