Skip to content

Commit 0450298

Browse files
committed
Pin the version of tokenizers on macOS Python3.6 to compile it
1 parent 8cbe01e commit 0450298

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

hanlp/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Author: hankcs
33
# Date: 2019-12-28 19:26
44

5-
__version__ = '2.1.0-beta.53'
5+
__version__ = '2.1.0-beta.54'
66
"""HanLP version"""
77

88

setup.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@
1313
exec(fp.read(), version)
1414

1515
FASTTEXT = 'fasttext-wheel==0.9.2'
16-
if sys.version_info >= (3, 10):
16+
sys_version_info = sys.version_info
17+
if sys_version_info >= (3, 10):
1718
TENSORFLOW = ['tensorflow>=2.8.0']
1819
else:
1920
TENSORFLOW = ['tensorflow==2.6.0', 'keras==2.6.0', 'protobuf<3.19']
2021

22+
TOKENIZERS = []
23+
if (sys_version_info.major, sys_version_info.minor) == (3, 6) and sys.platform == 'darwin':
24+
TOKENIZERS = ['tokenizers==0.10.3']
25+
2126
extras_require = {
2227
'amr': [
2328
'penman==1.2.1',
@@ -66,6 +71,7 @@
6671
'hanlp-common>=0.0.19',
6772
'hanlp-trie>=0.0.4',
6873
'hanlp-downloader',
74+
*TOKENIZERS,
6975
],
7076
extras_require=extras_require,
7177
python_requires='>=3.6',

0 commit comments

Comments
 (0)