forked from LeonB/pylibshout
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
67 lines (58 loc) · 1.84 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
"""Python libshout2 interface
Based on the c-libary libshout 2 and built with Cython
"""
classifiers = """\
Development Status :: 3 - Alpha
Intended Audience :: Developers
Programming Language :: Python
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Multimedia :: Sound/Audio
Operating System :: OS Independent
"""
from distutils.core import setup
from distutils.extension import Extension
VERSION = '1.0.0'
try:
from Cython.Distutils import build_ext
except ImportError:
have_cython = False
else:
have_cython = True
doclines = __doc__.split("\n")
if have_cython:
ext_modules = [Extension(
"pylibshout", ["pylibshout.pyx"],
libraries = ['shout'] #.h files
)]
setup(
name = 'pylibshout',
version = VERSION,
author = 'Leon Bogaert',
author_email = '[email protected]',
url = 'http://github.com/LeonB/pylibshout',
platforms = ["any"],
description = doclines[0],
classifiers = filter(None, classifiers.split("\n")),
long_description = "\n".join(doclines[2:]),
#py_modules = ['pylibshout'],
ext_modules = ext_modules,
cmdclass = {'build_ext': build_ext},
requires = ['Cython']
)
else:
ext_modules = [Extension("pylibshout",
["pylibshout.c"],
libraries=["shout"])]
setup(
name = 'pylibshout',
version = VERSION,
author = 'Leon Bogaert',
author_email = '[email protected]',
url = 'http://github.com/LeonB/pylibshout',
platforms = ["any"],
description = doclines[0],
classifiers = filter(None, classifiers.split("\n")),
long_description = "\n".join(doclines[2:]),
#py_modules = ['pylibshout'],
ext_modules = ext_modules
)