Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

#604 fix master installation

Merged
Ghost merged 1 commits into Deci-AI:master from deci-ai:feature/SG-000_fix_master_inastallation
1 changed files with 10 additions and 1 deletions
  1. 10
    1
      setup.py
@@ -11,6 +11,7 @@ README_LOCATION = "README.md"
 REQ_LOCATION = "requirements.txt"
 REQ_LOCATION = "requirements.txt"
 REQ_PRO_LOCATION = "requirements.pro.txt"
 REQ_PRO_LOCATION = "requirements.pro.txt"
 VERSION_FILE = "version.txt"
 VERSION_FILE = "version.txt"
+INIT_FILE = "src/super_gradients/__init__.py"
 
 
 
 
 def readme():
 def readme():
@@ -32,7 +33,15 @@ def get_pro_requirements():
 
 
 def get_version():
 def get_version():
     with open(VERSION_FILE, encoding="utf-8") as f:
     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(
 setup(
Discard