From 40bc3a5067828d750d7b38ffb7f46139b4d6f7c3 Mon Sep 17 00:00:00 2001 From: qinzy Date: Mon, 19 Feb 2024 18:23:59 +0000 Subject: [PATCH] update install --- .gitignore | 1 + README.md | 7 ++----- setup.py | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 924d0e7d..a9471736 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ basetts_outputs_use_bert/ basetts_outputs/ multilingual_ckpts basetts_outputs_package/ +build/ *.egg-info/ *.zip diff --git a/README.md b/README.md index 6b19debc..cf6cecea 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,2 @@ -## Usage (After installing OpenVoice) -``` -pip install . -python -m unidic download -``` \ No newline at end of file +# MyShell TTS Base Speakers + diff --git a/setup.py b/setup.py index dbf3a766..857608a5 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,24 @@ import os from setuptools import setup, find_packages +from setuptools.command.develop import develop +from setuptools.command.install import install cwd = os.path.dirname(os.path.abspath(__file__)) requirements = open(os.path.join(cwd, "requirements.txt"), "r").readlines() +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='MyShellTTSBase', version='0.1.0', @@ -13,4 +28,8 @@ package_data={ '': ['*.txt', 'cmudict_*'], }, + cmdclass={ + 'develop': PostDevelopCommand, + 'install': PostInstallCommand, + }, )