mirror of
https://github.com/google/sentencepiece.git
synced 2024-09-11 10:55:42 +03:00
Fixed build error on Mac.
This commit is contained in:
parent
9dee6649ae
commit
d8c4b04056
1
.gitignore
vendored
1
.gitignore
vendored
@ -70,3 +70,4 @@ m.vocab
|
||||
cmake_install.cmake
|
||||
libsentencepiece.so*
|
||||
libsentencepiece_train.so*
|
||||
python/bundled
|
||||
|
@ -1,3 +1,3 @@
|
||||
recursive-include test *.py *.model botchan.txt
|
||||
include *.i *.md VERSION
|
||||
include build_bundled.sh
|
||||
recursive-include src *.i
|
||||
include *.md VERSION build_bundled.sh
|
||||
|
@ -42,7 +42,7 @@ build() {
|
||||
for i in /opt/python/*
|
||||
do
|
||||
$i/bin/python setup.py bdist
|
||||
strip build/*/*.so
|
||||
strip build/*/*/*.so
|
||||
$i/bin/python setup.py bdist_wheel
|
||||
$i/bin/python setup.py test
|
||||
rm -fr build
|
||||
|
@ -53,9 +53,11 @@ def run_pkg_config(section, pkg_config_path=None):
|
||||
|
||||
|
||||
def is_sentencepiece_installed():
|
||||
return subprocess.run(
|
||||
'pkg-config sentencepiece --libs', shell=True,
|
||||
check=False).returncode == 0
|
||||
try:
|
||||
subprocess.check_call('pkg-config sentencepiece --libs', shell=True)
|
||||
return True
|
||||
except subprocess.CalledProcessError:
|
||||
return False
|
||||
|
||||
|
||||
class build_ext(_build_ext):
|
||||
|
Loading…
Reference in New Issue
Block a user