Skip to content

Commit 3614a31

Browse files
authored
When pinning TF Version, allow for various versions of RC. (#755)
PiperOrigin-RevId: 611254443
1 parent ae6bf84 commit 3614a31

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

oss_setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@
3838
)
3939

4040
# pin version to that of tensorflow or tf_nightly.
41+
version = "{{VERSION}}".lower()
4142
if "nightly" in "{{PACKAGE}}":
42-
version = "{{VERSION}}" # 2.17.0.dev2024021419
43-
base_version = version.split(".dev")[0]
43+
base_version = version.split(".dev")[0] # 2.17.0.dev2024021419
4444
install_requires = [f"tf-nightly~={base_version}.dev"]
45+
elif "rc" in version:
46+
base_version = version.split("rc")[0] # 2.16.0rc0
47+
install_requires = [f"tensorflow~={base_version}rc"]
4548
else:
4649
install_requires = ["tensorflow~={{VERSION}}"]
4750

0 commit comments

Comments
 (0)