-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1484 from Jackwaterveg/r0.1_develop
[Setup] make librosa version fixed
- Loading branch information
Showing
3 changed files
with
26 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,8 @@ | |
|
||
HERE = Path(os.path.abspath(os.path.dirname(__file__))) | ||
|
||
VERSION = '0.1.2' | ||
|
||
requirements = { | ||
"install": [ | ||
"editdistance", | ||
|
@@ -37,7 +39,7 @@ | |
"jieba", | ||
"jsonlines", | ||
"kaldiio", | ||
"librosa", | ||
"librosa==0.8.1", | ||
"loguru", | ||
"matplotlib", | ||
"nara_wpe", | ||
|
@@ -82,6 +84,24 @@ | |
} | ||
|
||
|
||
def write_version_py(filename='paddlespeech/__init__.py'): | ||
import paddlespeech | ||
if hasattr(paddlespeech, | ||
"__version__") and paddlespeech.__version__ == VERSION: | ||
return | ||
with open(filename, "a") as f: | ||
f.write(f"\n__version__ = '{VERSION}'\n") | ||
|
||
|
||
def remove_version_py(filename='paddlespeech/__init__.py'): | ||
with open(filename, "r") as f: | ||
lines = f.readlines() | ||
with open(filename, "w") as f: | ||
for line in lines: | ||
if "__version__" not in line: | ||
f.write(line) | ||
|
||
|
||
@contextlib.contextmanager | ||
def pushd(new_dir): | ||
old_dir = os.getcwd() | ||
|
@@ -169,10 +189,12 @@ def run(self): | |
sys.exit() | ||
|
||
|
||
write_version_py() | ||
|
||
setup_info = dict( | ||
# Metadata | ||
name='paddlespeech', | ||
version='0.1.1', | ||
version=VERSION, | ||
author='PaddlePaddle Speech and Language Team', | ||
author_email='[email protected]', | ||
url='https://github.com/PaddlePaddle/PaddleSpeech', | ||
|
@@ -235,3 +257,5 @@ def run(self): | |
}) | ||
|
||
setup(**setup_info) | ||
|
||
remove_version_py() |