Skip to content

Commit

Permalink
Requirements Manager support for git packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Stax124 committed Oct 15, 2023
1 parent 0b0e683 commit 9523828
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/install_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"open_clip_torch": "open_clip",
"python-multipart": "multipart",
"discord.py": "discord",
"HyperTile": "hyper-tile",
}
logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -45,8 +46,11 @@ def install_requirements(path_to_requirements: str = "requirements.txt"):
continue

if "git+http" in i:
logger.debug(f"Skipping git requirement (cannot check version): {i}")
continue
tmp = i.split("@")[0].split("/")[-1].replace(".git", "").strip()
logger.debug(
f"Rewrote git requirement (cannot check hash, but proceeding): {i} => {tmp}"
)
i = tmp

if "==" in i:
requirements[i.split("==")[0]] = i.replace(i.split("==")[0], "").strip()
Expand Down

0 comments on commit 9523828

Please sign in to comment.