Spaces:
Runtime error
Runtime error
subrpcess for setup.py in app.py
Browse filesFiles changed (4)
- app.py+6-139
- requirements.dev.txtAdded+5
- requirements.ja.txtAdded+5
- requirements.notebooks.txtAdded
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144#!/usr/bin/env python# ,*++++++*, ,*++++++*,# *++. .+++ *++. .++*# *+* ,++++* *+* *+* ,++++, *+*# ,+, .++++++++++* ,++,,,,*+, ,++++++++++. *+,# *+. .++++++++++++..++ *+.,++++++++++++. .+*# .+* ++++++++++++.*+, .+*.++++++++++++ *+,# .++ *++++++++* ++, .++.*++++++++* ++,# ,+++*. . .*++, ,++*. .*+++*# *+, .,*++**. .**++**. ,+*# .+* *+,# *+. Coqui .+*# *+* +++ TTS +++ *+*# .+++*. . . *+++.# ,+* *+++*... ...*+++* *+,# .++. .""""+++++++****+++++++"""". ++.# ,++. .++,# .++* *++.# *+++, ,+++*# .,*++++::::::++++*,.# ``````import osimport subprocessimport sysfrom packaging.version import Versionimport numpyimport setuptools.command.build_pyimport setuptools.command.developfrom Cython.Build import cythonizefrom setuptools import Extension, find_packages, setuppython_version = sys.version.split()[0]if Version(python_version) < Version("3.9") or Version(python_version) >= Version("3.12"):raise RuntimeError("TTS requires python >= 3.9 and < 3.12 " "but your Python version is {}".format(sys.version))cwd = os.path.dirname(os.path.abspath(__file__))with open(os.path.join(cwd, "TTS", "VERSION")) as fin:version = fin.read().strip()class build_py(setuptools.command.build_py.build_py): # pylint: disable=too-many-ancestorsdef 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)# The documentation for this feature is in server/README.mdpackage_data = ["TTS/server/templates/*"]def pip_install(package_name):subprocess.call([sys.executable, "-m", "pip", "install", package_name])requirements = open(os.path.join(cwd, "requirements.txt"), "r").readlines()with open(os.path.join(cwd, "requirements.notebooks.txt"), "r") as f:requirements_notebooks = f.readlines()with open(os.path.join(cwd, "requirements.dev.txt"), "r") as f:requirements_dev = f.readlines()with open(os.path.join(cwd, "requirements.ja.txt"), "r") as f:requirements_ja = f.readlines()requirements_all = requirements_dev + requirements_notebooks + requirements_jawith open("README.md", "r", encoding="utf-8") as readme_file:README = readme_file.read()exts = [Extension(name="TTS.tts.utils.monotonic_align.core",sources=["TTS/tts/utils/monotonic_align/core.pyx"],)]setup(name="TTS",version=version,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.",long_description=README,long_description_content_type="text/markdown",license="MPL-2.0",# cythoninclude_dirs=numpy.get_include(),ext_modules=cythonize(exts, language_level=3),# ext_modules=find_cython_extensions(),# packageinclude_package_data=True,packages=find_packages(include=["TTS"], exclude=["*.tests", "*tests.*", "tests.*", "*tests", "tests"]),package_data={"TTS": ["VERSION",]},project_urls={"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",},cmdclass={"build_py": build_py,"develop": develop,# 'build_ext': build_ext},install_requires=requirements,extras_require={"all": requirements_all,"dev": requirements_dev,"notebooks": requirements_notebooks,"ja": requirements_ja,},python_requires=">=3.9.0, <3.12",entry_points={"console_scripts": ["tts=TTS.bin.synthesize:main", "tts-server = TTS.server.server:main"]},classifiers=["Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3.9","Programming Language :: Python :: 3.10","Programming Language :: Python :: 3.11","Development Status :: 3 - Alpha","Intended Audience :: Science/Research","Intended Audience :: Developers","Operating System :: POSIX :: Linux","License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)","Topic :: Software Development","Topic :: Software Development :: Libraries :: Python Modules","Topic :: Multimedia :: Sound/Audio :: Speech","Topic :: Multimedia :: Sound/Audio","Topic :: Multimedia","Topic :: Scientific/Engineering :: Artificial Intelligence",],zip_safe=False,)import gradio as grimport torch1234567891011import subprocess# Run the setup.py install commandtry:subprocess.run(['python', 'setup.py', 'install'], check=True)print("Installation successful.")except subprocess.CalledProcessError as e:print(f"Installation failed with error: {e}")import gradio as grimport torch
12345blackcoverageisortnose2pylint==2.10.212345# These cause some compatibility issues on some systems and are not strictly necessary# japanese g2p depsmecab-python3==1.0.6unidic-lite==1.0.8cutletapp.py+6-139
requirements.dev.txtAdded+5
requirements.ja.txtAdded+5
requirements.notebooks.txtAdded