forked from quiet/quiet.py
-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
43 lines (33 loc) · 1.16 KB
/
setup.py
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
from setuptools import setup
from setuptools.command.build_py import build_py
import ctypes.util
import subprocess
import os
with open('README.md') as f:
long_description = f.read()
class BuildPyCommand(build_py):
"""Custom build command."""
def run(self):
# check if libquiet.so is at system lib paths
if not ctypes.util.find_library('quiet'):
libquiet = os.path.join(os.path.dirname(
__file__), 'quiet', 'libquiet.so')
if not os.path.isfile(libquiet):
# build libquiet.so
subprocess.check_call(['bash', 'scripts/libs.sh'])
build_py.run(self)
setup(name='quiet.py',
version='0.1',
description='Quiet Modem, to transmit data with sound',
long_description=long_description,
long_description_content_type='text/markdown',
author='Brian Armstrong, Yihui Xiong',
author_email='[email protected]',
url='https://github.com/quiet/quiet.py',
cmdclass={
'build_py': BuildPyCommand,
},
packages=['quiet'],
include_package_data=True,
install_requires=['numpy'],
zip_safe=False)