提交 565a63c5 编写于 作者: H huangyuxin

refactor the setup in paddleaudio

上级 eb91ce84
......@@ -14,4 +14,10 @@
from .backends import *
from .features import *
__version__ = '0.1.0'
try:
from .version import full_version as __version__
except ImportError:
import sys
sys.stderr.write(
"Warning: import paddlaudio from source directory without installing, run 'python setup_audio.py install' to install paddlespeech firstly\n"
)
......@@ -16,5 +16,5 @@ try:
except ImportError:
import sys
sys.stderr.write(
"Warning: import paddlespeech from source directory without installing, run 'python setup.py install' to install paddlespeech firstly\n"
"Warning: import paddlespeech from source directory without installing, run 'python setup.py install' to install paddlespeech firstly.\n"
)
......@@ -85,7 +85,7 @@ requirements = {
def write_version_py(filename='paddlespeech/version.py'):
ver_str = """# THIS FILE IS GENERATED FROM PADDLEPADDLE SETUP.PY
ver_str = """# THIS FILE IS GENERATED FROM PADDLESPEECH SETUP.PY
#
full_version = '%(version)s'
"""
......
......@@ -13,14 +13,24 @@
# limitations under the License.
import setuptools
import paddleaudio
# set the version here
version = paddleaudio.__version__
PADDLEAUDIO_VERSION = '0.1.0'
def write_version_py(filename='paddleaudio/version.py'):
ver_str = """# THIS FILE IS GENERATED FROM SETUP_AUDIO.PY
#
full_version = '%(version)s'
"""
with open(filename, 'w') as f:
f.write(ver_str % {'version': PADDLEAUDIO_VERSION})
write_version_py()
setuptools.setup(
name="paddleaudio",
version=version,
version=PADDLEAUDIO_VERSION,
author="",
author_email="",
description="PaddleAudio, in development",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册