Skip to content

Commit aa06f8a

Browse files
committed
Refactor install_hivecraft to install specific version from PyPI
1 parent f221c3d commit aa06f8a

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

entrypoint.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@ def install_hivecraft(version):
1111
"""Install Hivecraft from GitHub"""
1212
print(f"🐝 Installing Hivecraft version: {version}")
1313

14-
if version.lower() == "latest":
15-
cmd = ["pip", "install", "git+https://github.com/AlgoHive-Coding-Puzzles/HiveCraft.git"]
16-
else:
17-
cmd = ["pip", "install", f"git+https://github.com/AlgoHive-Coding-Puzzles/HiveCraft.git@{version}"]
14+
# if version.lower() == "latest":
15+
# cmd = ["pip", "install", "git+https://github.com/AlgoHive-Coding-Puzzles/HiveCraft.git"]
16+
# else:
17+
# cmd = ["pip", "install", f"git+https://github.com/AlgoHive-Coding-Puzzles/HiveCraft.git@{version}"]
18+
19+
hivecraft_p = "hivecraft"
20+
if version:
21+
hivecraft_p += f"=={version}"
22+
23+
# Install the latest version of Hivecraft from PyPI
24+
cmd = ["pip", "install", hivecraft_p]
1825

1926
subprocess.run(cmd, check=True)
2027
print("✅ Hivecraft installed successfully")

0 commit comments

Comments
 (0)