File tree Expand file tree Collapse file tree 3 files changed +26
-52
lines changed Expand file tree Collapse file tree 3 files changed +26
-52
lines changed Original file line number Diff line number Diff line change 1111# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212# See the License for the specific language governing permissions and
1313# limitations under the License.
14-
15- __version__ = '0.1.0'
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2727
2828HERE = Path (os .path .abspath (os .path .dirname (__file__ )))
2929
30+ VERSION = '0.1.2'
31+
3032requirements = {
3133 "install" : [
3234 "editdistance" ,
3739 "jieba" ,
3840 "jsonlines" ,
3941 "kaldiio" ,
40- "librosa" ,
42+ "librosa==0.8.1 " ,
4143 "loguru" ,
4244 "matplotlib" ,
4345 "nara_wpe" ,
8284}
8385
8486
87+ def write_version_py (filename = 'paddlespeech/__init__.py' ):
88+ import paddlespeech
89+ if hasattr (paddlespeech ,
90+ "__version__" ) and paddlespeech .__version__ == VERSION :
91+ return
92+ with open (filename , "a" ) as f :
93+ f .write (f"\n __version__ = '{ VERSION } '\n " )
94+
95+
96+ def remove_version_py (filename = 'paddlespeech/__init__.py' ):
97+ with open (filename , "r" ) as f :
98+ lines = f .readlines ()
99+ with open (filename , "w" ) as f :
100+ for line in lines :
101+ if "__version__" not in line :
102+ f .write (line )
103+
104+
85105@contextlib .contextmanager
86106def pushd (new_dir ):
87107 old_dir = os .getcwd ()
@@ -169,10 +189,12 @@ def run(self):
169189 sys .exit ()
170190
171191
192+ write_version_py ()
193+
172194setup_info = dict (
173195 # Metadata
174196 name = 'paddlespeech' ,
175- version = '0.1.1' ,
197+ version = VERSION ,
176198 author = 'PaddlePaddle Speech and Language Team' ,
177199178200 url = 'https://github.com/PaddlePaddle/PaddleSpeech' ,
@@ -235,3 +257,5 @@ def run(self):
235257 })
236258
237259setup (** setup_info )
260+
261+ remove_version_py ()
You can’t perform that action at this time.
0 commit comments