diff --git a/setup.py b/setup.py
index f85c09381a5951c95a910c362de19c8c9c353eca..b9aad58c03e44142c16aa4f468c2f011a4218a6b 100755
--- a/setup.py
+++ b/setup.py
@@ -97,6 +97,9 @@ def get_version_info():
 
     if os.path.exists('.git'):
         GIT_REVISION = git_version()
+    elif os.path.exists('caosdb_pylib_commit'):
+        with open('caosdb_pylib_commit', 'r') as f:
+            GIT_REVISION = f.read()
     elif os.path.exists('src/caosdb/version.py'):
         # must be a source distribution, use existing version file
         try: