Skip to content

Commit 5230acc

Browse files
committed
[sharktank] Move version_info.json to subdir
Furthermore, unify the way the path to the version file is determined (now similar to shortfin).
1 parent 652c5ed commit 5230acc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

sharktank/setup.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,23 @@
1313

1414
THIS_DIR = Path(__file__).resolve().parent
1515
REPO_DIR = THIS_DIR.parent
16-
VERSION_INFO_FILE = REPO_DIR / "version_info.json"
16+
SETUPPY_DIR = os.path.realpath(os.path.dirname(__file__))
1717

1818

1919
with open(
2020
os.path.join(
21-
THIS_DIR,
21+
SETUPPY_DIR,
2222
"README.md",
2323
),
2424
"rt",
2525
) as f:
2626
README = f.read()
2727

2828

29+
# Setup and get version information.
30+
VERSION_INFO_FILE = os.path.join(SETUPPY_DIR, "version_info.json")
31+
32+
2933
def load_version_info():
3034
with open(VERSION_INFO_FILE, "rt") as f:
3135
return json.load(f)
File renamed without changes.

0 commit comments

Comments
 (0)