Skip to content

Commit 538e3c5

Browse files
fix build error (#2326)
Co-authored-by: ZhangJianyu <[email protected]>
1 parent 8a593c7 commit 538e3c5

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ __pycache__
1616
/build/
1717
[Bb]uild/
1818
*.whl
19+
build_tmp

docs/build_docs/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ cp -f "../CODE_OF_CONDUCT.md" "./source/"
9090
#sed -i 's/docs\/guide/guide/g' ./source/docs/get_started.md
9191

9292
sed -i 's/.md/.html/g' ./source/get_started.md
93-
sed -i 's/.md/.html/g' ./source/docs/install/experimental/install_for_cpp.md
93+
sed -i 's/.md/.html/g' ./source/docs/install/install_for_cpp.md
9494

9595
sed -i 's/pluggable-device-for-tensorflow.html/pluggable-device-for-tensorflow.md/g' ./source/get_started.md
9696
sed -i 's/third-party-programs\/THIRD-PARTY-PROGRAMS/https:\/\/github.com\/intel\/intel-extension-for-tensorflow\/blob\/main\/third-party-programs\/THIRD-PARTY-PROGRAMS/g' ./source/get_started.md

docs/build_docs/source/conf.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@
99
from datetime import datetime
1010
from setuptools_scm import get_version
1111
# See https://pypi.org/project/setuptools-scm/#programmatic-usage
12-
version = get_version(root='../..', relative_to=__file__)
12+
import subprocess
13+
14+
# See https://pypi.org/project/setuptools-scm/#programmatic-usage
15+
try:
16+
version = get_version(root='../..', relative_to=__file__)
17+
except:
18+
output = subprocess.check_output("git describe --tags --abbrev=0", shell=True)
19+
output = output[:-1]
20+
version = output.decode('utf-8')
21+
1322
release = version
1423

1524
with open("version.txt", "w") as f:

0 commit comments

Comments
 (0)