Skip to content

Commit

Permalink
fix master installation (#604)
Browse files Browse the repository at this point in the history
* fix master installation

* fix master installation

* fix master installation

* fix master installation

* fix master installation
  • Loading branch information
ofrimasad authored Jan 8, 2023
1 parent 12ebdc2 commit 3445523
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
REQ_LOCATION = "requirements.txt"
REQ_PRO_LOCATION = "requirements.pro.txt"
VERSION_FILE = "version.txt"
INIT_FILE = "src/super_gradients/__init__.py"


def readme():
Expand All @@ -32,7 +33,15 @@ def get_pro_requirements():

def get_version():
with open(VERSION_FILE, encoding="utf-8") as f:
return f.readline()
ver = f.readline()

if ver.startswith("for"):
with open(INIT_FILE, encoding="utf-8") as f:
for line in f.readlines():
if line.startswith("__version__"):
ver = line.split()[-1].strip('"') + "+master"

return ver


setup(
Expand Down

0 comments on commit 3445523

Please sign in to comment.