Skip to content

Commit c937f72

Browse files
authored
Remove +cpu from version name (#687)
1 parent 186be2d commit c937f72

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,14 @@ def _write_version_files():
188188
# the content of `version.txt` plus some suffix like "+cpu" or "+cu112".
189189
# See
190190
# https://github.com/pytorch/test-infra/blob/61e6da7a6557152eb9879e461a26ad667c15f0fd/tools/pkg-helpers/pytorch_pkg_helpers/version.py#L113
191+
version = version.replace("+cpu", "")
191192
with open(_ROOT_DIR / "version.txt", "w") as f:
192193
f.write(f"{version}")
193194
else:
194195
with open(_ROOT_DIR / "version.txt") as f:
195196
version = f.readline().strip()
196197
try:
198+
version = version.replace("+cpu", "")
197199
sha = (
198200
subprocess.check_output(
199201
["git", "rev-parse", "HEAD"], cwd=str(_ROOT_DIR)

0 commit comments

Comments
 (0)