mirror of
https://github.com/google/sentencepiece.git
synced 2024-12-29 11:11:58 +03:00
update setup.py
This commit is contained in:
parent
45346977ff
commit
7a5d14cfdf
@ -58,14 +58,18 @@ def is_sentencepiece_installed():
|
||||
|
||||
|
||||
def get_cflags_and_libs(root):
|
||||
cflags = ['-std=c++11']
|
||||
cflags = cflags + ['-std=c++11', '-I' + os.path.join(root, 'include')]
|
||||
libs = []
|
||||
if os.path.exists(os.path.join(root, 'lib/pkgconfig/sentencepiece.pc')):
|
||||
cflags = cflags + ['-I' + os.path.join(root, 'include')]
|
||||
libs = [
|
||||
os.path.join(root, 'lib/libsentencepiece.a'),
|
||||
os.path.join(root, 'lib/libsentencepiece_train.a'),
|
||||
]
|
||||
elif os.path.exists(os.path.join(root, 'lib64/pkgconfig/sentencepiece.pc')):
|
||||
libs = [
|
||||
os.path.join(root, 'lib64/libsentencepiece.a'),
|
||||
os.path.join(root, 'lib64/libsentencepiece_train.a'),
|
||||
]
|
||||
return cflags, libs
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user