This repository has been archived by the owner on Dec 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
executable file
·123 lines (105 loc) · 3.48 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import sys
from scarlett import __version__ as version
try:
#from setuptools import setup, find_packages
from setuptools import setup
extra = dict(test_suite="tests.test.suite", include_package_data=True)
except ImportError:
from distutils.core import setup
extra = {}
if sys.argv[-1] == "publish":
os.system("python setup.py sdist upload")
sys.exit()
readme = open("README.rst").read()
history = open("HISTORY.rst").read().replace(".. :changelog:", "")
static = {}
for root, dirs, files in os.walk('static'):
for filename in files:
filepath = os.path.join(root, filename)
if root not in static:
static[root] = []
static[root].append(filepath)
# Might use this later
try:
here = os.path.abspath(os.path.dirname(__file__))
except:
pass
def read_requirements(filename):
content = open(os.path.join(here, filename)).read()
requirements = map(lambda r: r.strip(), content.splitlines())
return requirements
requirements = read_requirements('requirements.txt')
test_requirements = read_requirements('requirements_dev.txt')
# Build manpages if we're making a source distribution tarball.
# if 'sdist' in sys.argv:
# Go into the docs directory and build the manpage.
### docdir = os.path.join(os.path.dirname(__file__), 'docs')
### curdir = os.getcwd()
# os.chdir(docdir)
# try:
### subprocess.check_call(['make', 'man'])
# finally:
# os.chdir(curdir)
###
# Copy resulting manpages.
### mandir = os.path.join(os.path.dirname(__file__), 'man')
# if os.path.exists(mandir):
# shutil.rmtree(mandir)
### shutil.copytree(os.path.join(docdir, '_build', 'man'), mandir)
setup(
name="scarlett",
version=version,
description="S.C.A.R.L.E.T.T is Tony Darks artificially programmed intelligent computer. It is programmed to speak with a female voice in a British accent.",
long_description=readme + "\n\n" + history,
author="Malcolm Jones",
author_email="bossjones@theblacktonystark.com",
url="https://github.com/bossjones/scarlett",
packages=[
"scarlett",
"scarlett.basics",
"scarlett.core",
"scarlett.features",
"scarlett.brain",
"scarlett.listener"
],
package_dir={"scarlett":
"scarlett"},
data_files=static.items(),
install_requires=[
],
scripts=[
'bin/scarlett',
'bin/scarlett_improved',
'bin/scarlett_test',
'bin/scarlett_echo_client_test.py',
'bin/scarlett_worker_cb_test.py',
'bin/catwav',
'bin/silence',
'bin/resample_for_ps',
'bin/pad_wav'],
license="MIT",
platforms="Posix; MacOS X",
zip_safe=False,
keywords="scarlett,Speech, Pocketsphinx, GUI",
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Environment :: Console",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Python Modules",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Environment :: X11 Applications :: GTK",
"Environment :: Console",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Topic :: Multimedia :: Sound/Audio :: Speech",
"Natural Language :: English",
],
**extra
)