-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathcommon.py
61 lines (52 loc) · 2.03 KB
/
common.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
descr = """\
Samplerate is a small python package to do high quality audio resampling for
data in numpy arrays; IOW, it is a matlab resample replacement.
Samplerate is a wrapper around the Secret Rabbit Code from Erik de Castro Lopo
(http://www.mega-nerd.com/SRC/), which has high quality converters based on the
work of J.O Smith from CCRMA (see
http://ccrma.stanford.edu/~jos/resample/optfir.pdf)
"""
DISTNAME = 'scikits.samplerate'
DESCRIPTION = 'A python module for high quality audio resampling'
LONG_DESCRIPTION = descr
MAINTAINER = 'David Cournapeau'
MAINTAINER_EMAIL = '[email protected]'
URL = 'http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/samplerate'
LICENSE = 'GPL'
DOWNLOAD_URL = 'http://pypi.python.org/pypi/scikits.samplerate'
MAJOR = 0
MINOR = 3
MICRO = 4
DEV = True
CLASSIFIERS = ['Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Topic :: Multimedia :: Sound/Audio',
'Topic :: Scientific/Engineering']
def build_verstring():
return '%d.%d.%d' % (MAJOR, MINOR, MICRO)
def build_fverstring():
if DEV:
return build_verstring() + '.dev'
else:
return build_verstring()
def write_version(fname):
f = open(fname, "w")
f.writelines("short_version = '%s'\n" % build_verstring())
f.writelines("dev =%s\n" % DEV)
f.writelines("version = '%s'\n" % build_fverstring())
f.close()
def write_info(fname):
f = open(fname, "w")
f.writelines("# THIS FILE IS GENERATED FROM THE SETUP.PY. DO NOT EDIT.\n")
f.writelines('"""%s"""' % descr)
f.writelines("""
# version of the python module (compatibility -> use
# scikits.samplerate.version.version instead, to be consistent with numpy)
from .version import short_version as version
ignore = False""")
f.close()
VERSION = build_fverstring()
INSTALL_REQUIRE = 'numpy'