refactor the setup in paddleaudio

pull/1361/head
huangyuxin 2 years ago
parent eb91ce84f9
commit 565a63c5ef

@ -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",

Loading…
Cancel
Save