add checking that file setup.py exists
@@ -70,6 +70,7 @@ def _get_moler_version():
version = "UNKNOWN"
setup_py_path = os.path.join(os.path.dirname(__file__), "..", "..", "setup.py")
+ if os.path.isfile(setup_py_path):
with open(setup_py_path, "r") as f:
for line in f:
search_version = re.search(r'version\s*=\s*\'(?P<VERSION>\d+\.\d+\.\d+)', line)
