Skip to content

Commit

Permalink
[sharktank] Revise setup.py file (#346)
Browse files Browse the repository at this point in the history
* Move `version_info.json` to sharktank subdir
* Pulls in the local requirements file for sharktank
  • Loading branch information
marbre authored Oct 30, 2024
1 parent c1176b6 commit c6c7321
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions sharktank/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,23 @@

from setuptools import find_namespace_packages, setup # type: ignore

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 Expand Up @@ -54,7 +56,7 @@ def load_requirement_pins(requirements_file: Path):
requirement_pins.update(dict(pin_pairs))


load_requirement_pins(REPO_DIR / "requirements.txt")
load_requirement_pins("requirements.txt")


def get_version_spec(dep: str):
Expand Down
File renamed without changes.

0 comments on commit c6c7321

Please sign in to comment.