From b0128db2f96d8142eb27d9bf8bcd2efde701602b Mon Sep 17 00:00:00 2001 From: liyulingyue <852433440@qq.com> Date: Thu, 16 Jan 2025 18:39:22 +0800 Subject: [PATCH] auto scipy --- setup.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4904983cd..51d46a1a1 100644 --- a/setup.py +++ b/setup.py @@ -51,6 +51,16 @@ def determine_opencc_version(): return "opencc" # default +def determine_scipy_version(): + # get python version + python_version = f"{sys.version_info.major}.{sys.version_info.minor}" + + # determine scipy version + if python_version == "3.8": + return "scipy>=1.4.0, <=1.12.0" # Python3.8 need scipy>=1.4.0, <=1.12.0 + return "scipy" # default + + base = [ "braceexpand", "editdistance", @@ -63,7 +73,7 @@ base = [ # paddleaudio align with librosa==0.8.1, which need numpy==1.23.x "numpy==1.23.5", "librosa==0.8.1", - "scipy", + determine_scipy_version(), # scipy or scipy>=1.4.0, <=1.12.0 "loguru", "matplotlib", "nara_wpe",