Skip to content

Commit

Permalink
[sharktank] Move version_info.json to subdir
Browse files Browse the repository at this point in the history
Furthermore, unify the way the path to the version file is determined
(now similar to shortfin).
  • Loading branch information
marbre committed Oct 29, 2024
1 parent 652c5ed commit 5230acc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sharktank/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,23 @@

THIS_DIR = Path(__file__).resolve().parent
REPO_DIR = THIS_DIR.parent
VERSION_INFO_FILE = REPO_DIR / "version_info.json"
SETUPPY_DIR = os.path.realpath(os.path.dirname(__file__))


with open(
os.path.join(
THIS_DIR,
SETUPPY_DIR,
"README.md",
),
"rt",
) as f:
README = f.read()


# Setup and get version information.
VERSION_INFO_FILE = os.path.join(SETUPPY_DIR, "version_info.json")


def load_version_info():
with open(VERSION_INFO_FILE, "rt") as f:
return json.load(f)
Expand Down
File renamed without changes.

0 comments on commit 5230acc

Please sign in to comment.