Files
MeloTTS/setup.py
2024-02-28 21:19:23 -08:00

40 lines
1.1 KiB
Python

import os
from setuptools import setup, find_packages
from setuptools.command.develop import develop
from setuptools.command.install import install
from pip.req import parse_requirements
cwd = os.path.dirname(os.path.abspath(__file__))
install_reqs = parse_requirements('requirements.txt')
reqs = [str(ir.req) for ir in install_reqs]
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
install.run(self)
os.system('python -m unidic download')
class PostDevelopCommand(develop):
"""Post-installation for development mode."""
def run(self):
develop.run(self)
os.system('python -m unidic download')
setup(
name='melotts',
version='0.1.2',
packages=find_packages(),
include_package_data=True,
install_requires=reqs,
package_data={
'': ['*.txt', 'cmudict_*'],
},
entry_points={
"console_scripts": [
"melotts = melo.main:main",
"melo = melo.main:main",
"melo-ui = melo.app:main",
],
},
)