2018-06-21 15:48:13 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
2019-11-27 16:40:32 +01:00
|
|
|
import os
|
|
|
|
|
import subprocess
|
|
|
|
|
import sys
|
2021-01-28 17:04:08 +01:00
|
|
|
from distutils.version import LooseVersion
|
2019-11-27 16:40:32 +01:00
|
|
|
|
2021-01-26 02:57:50 +01:00
|
|
|
import numpy
|
2018-06-21 15:48:13 +02:00
|
|
|
import setuptools.command.build_py
|
2021-01-26 02:57:50 +01:00
|
|
|
import setuptools.command.develop
|
2021-01-29 01:36:21 +01:00
|
|
|
from Cython.Build import cythonize
|
2021-04-09 00:45:20 +02:00
|
|
|
from setuptools import Extension, find_packages, setup
|
2021-01-28 17:04:08 +01:00
|
|
|
|
|
|
|
|
if LooseVersion(sys.version) < LooseVersion("3.6") or LooseVersion(sys.version) > LooseVersion("3.9"):
|
2021-06-18 14:57:05 +02:00
|
|
|
raise RuntimeError("TTS requires python >= 3.6 and <=3.10 " "but your Python version is {}".format(sys.version))
|
2019-11-27 16:40:32 +01:00
|
|
|
|
2018-06-21 15:48:13 +02:00
|
|
|
|
|
|
|
|
cwd = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
|
|
2021-06-04 10:10:51 +02:00
|
|
|
cwd = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
|
with open(os.path.join(cwd, "TTS", "VERSION")) as fin:
|
|
|
|
|
version = fin.read().strip()
|
|
|
|
|
|
|
|
|
|
|
2020-08-04 14:07:47 +02:00
|
|
|
class build_py(setuptools.command.build_py.build_py): # pylint: disable=too-many-ancestors
|
2018-06-21 15:48:13 +02:00
|
|
|
def run(self):
|
|
|
|
|
setuptools.command.build_py.build_py.run(self)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class develop(setuptools.command.develop.develop):
|
|
|
|
|
def run(self):
|
|
|
|
|
setuptools.command.develop.develop.run(self)
|
|
|
|
|
|
|
|
|
|
|
2019-12-09 17:25:49 +01:00
|
|
|
# The documentation for this feature is in server/README.md
|
2021-06-04 10:10:51 +02:00
|
|
|
package_data = ["TTS/server/templates/*"]
|
2018-06-21 15:48:13 +02:00
|
|
|
|
2020-07-12 15:36:36 +02:00
|
|
|
|
|
|
|
|
def pip_install(package_name):
|
2021-06-04 10:10:51 +02:00
|
|
|
subprocess.call([sys.executable, "-m", "pip", "install", package_name])
|
2020-07-12 15:36:36 +02:00
|
|
|
|
|
|
|
|
|
2021-06-04 10:10:51 +02:00
|
|
|
requirements = open(os.path.join(cwd, "requirements.txt"), "r").readlines()
|
|
|
|
|
with open(os.path.join(cwd, "requirements.notebooks.txt"), "r") as f:
|
2021-04-26 20:34:01 +02:00
|
|
|
requirements_notebooks = f.readlines()
|
2021-06-04 10:10:51 +02:00
|
|
|
with open(os.path.join(cwd, "requirements.dev.txt"), "r") as f:
|
2021-04-26 20:34:01 +02:00
|
|
|
requirements_dev = f.readlines()
|
2021-06-04 10:10:51 +02:00
|
|
|
with open(os.path.join(cwd, "requirements.tf.txt"), "r") as f:
|
2021-04-26 20:34:01 +02:00
|
|
|
requirements_tf = f.readlines()
|
|
|
|
|
requirements_all = requirements_dev + requirements_notebooks + requirements_tf
|
|
|
|
|
|
2021-06-04 10:10:51 +02:00
|
|
|
with open("README.md", "r", encoding="utf-8") as readme_file:
|
2021-01-25 11:16:20 +01:00
|
|
|
README = readme_file.read()
|
|
|
|
|
|
2021-06-04 10:10:51 +02:00
|
|
|
exts = [
|
|
|
|
|
Extension(
|
|
|
|
|
name="TTS.tts.layers.glow_tts.monotonic_align.core",
|
|
|
|
|
sources=["TTS/tts/layers/glow_tts/monotonic_align/core.pyx"],
|
|
|
|
|
)
|
|
|
|
|
]
|
2018-08-02 16:34:17 +02:00
|
|
|
setup(
|
2021-06-04 10:10:51 +02:00
|
|
|
name="TTS",
|
2018-08-02 16:34:17 +02:00
|
|
|
version=version,
|
2021-06-04 10:10:51 +02:00
|
|
|
url="https://github.com/coqui-ai/TTS",
|
|
|
|
|
author="Eren Gölge",
|
|
|
|
|
author_email="egolge@coqui.ai",
|
|
|
|
|
description="Deep learning for Text to Speech by Coqui.",
|
2021-01-25 13:06:12 +01:00
|
|
|
long_description=README,
|
|
|
|
|
long_description_content_type="text/markdown",
|
2021-06-04 10:10:51 +02:00
|
|
|
license="MPL-2.0",
|
2021-01-26 02:57:50 +01:00
|
|
|
# cython
|
|
|
|
|
include_dirs=numpy.get_include(),
|
|
|
|
|
ext_modules=cythonize(exts, language_level=3),
|
|
|
|
|
# ext_modules=find_cython_extensions(),
|
|
|
|
|
# package
|
|
|
|
|
include_package_data=True,
|
2021-06-04 10:10:51 +02:00
|
|
|
packages=find_packages(include=["TTS*"]),
|
|
|
|
|
package_data={
|
|
|
|
|
"TTS": [
|
|
|
|
|
"VERSION",
|
|
|
|
|
]
|
|
|
|
|
},
|
2019-08-26 15:18:43 +02:00
|
|
|
project_urls={
|
2021-06-04 10:10:51 +02:00
|
|
|
"Documentation": "https://github.com/coqui-ai/TTS/wiki",
|
|
|
|
|
"Tracker": "https://github.com/coqui-ai/TTS/issues",
|
|
|
|
|
"Repository": "https://github.com/coqui-ai/TTS",
|
|
|
|
|
"Discussions": "https://github.com/coqui-ai/TTS/discussions",
|
2019-08-30 10:29:22 +02:00
|
|
|
},
|
2018-08-02 16:34:17 +02:00
|
|
|
cmdclass={
|
2021-06-04 10:10:51 +02:00
|
|
|
"build_py": build_py,
|
|
|
|
|
"develop": develop,
|
2021-01-26 02:57:50 +01:00
|
|
|
# 'build_ext': build_ext
|
2018-08-02 16:34:17 +02:00
|
|
|
},
|
2021-01-25 13:06:12 +01:00
|
|
|
install_requires=requirements,
|
2021-04-26 20:34:01 +02:00
|
|
|
extras_require={
|
|
|
|
|
"all": requirements_all,
|
|
|
|
|
"dev": requirements_dev,
|
|
|
|
|
"notebooks": requirements_notebooks,
|
|
|
|
|
"tf": requirements_tf,
|
|
|
|
|
},
|
2021-06-18 14:57:05 +02:00
|
|
|
python_requires=">=3.6.0, <3.10",
|
2021-06-04 10:10:51 +02:00
|
|
|
entry_points={"console_scripts": ["tts=TTS.bin.synthesize:main", "tts-server = TTS.server.server:main"]},
|
2020-07-12 15:36:36 +02:00
|
|
|
classifiers=[
|
|
|
|
|
"Programming Language :: Python",
|
|
|
|
|
"Programming Language :: Python :: 3",
|
|
|
|
|
"Programming Language :: Python :: 3.6",
|
|
|
|
|
"Programming Language :: Python :: 3.7",
|
|
|
|
|
"Programming Language :: Python :: 3.8",
|
2021-06-04 10:10:51 +02:00
|
|
|
"Development Status :: 3 - Alpha",
|
2021-01-25 11:16:20 +01:00
|
|
|
"Intended Audience :: Science/Research",
|
|
|
|
|
"Intended Audience :: Developers",
|
2020-07-12 15:36:36 +02:00
|
|
|
"Operating System :: POSIX :: Linux",
|
2021-06-04 10:10:51 +02:00
|
|
|
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
|
2021-01-25 11:16:20 +01:00
|
|
|
"Topic :: Software Development",
|
|
|
|
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
|
|
|
"Topic :: Multimedia :: Sound/Audio :: Speech",
|
|
|
|
|
"Topic :: Multimedia :: Sound/Audio",
|
|
|
|
|
"Topic :: Multimedia",
|
2021-06-04 10:10:51 +02:00
|
|
|
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
2021-01-26 02:57:50 +01:00
|
|
|
],
|
2021-06-04 10:10:51 +02:00
|
|
|
zip_safe=False,
|
2021-01-26 02:57:50 +01:00
|
|
|
)
|