Skip to content
Snippets Groups Projects

Updating models to allow normal imports

Open Zach Marshall requested to merge zmarshal/MadGraphModels:normal_imports into main
@@ -32,12 +32,14 @@ __email__ = "huasheng.shao@cern.ch"
# Initializing value so that failing to find the version will not alter behaviour
mg_version = "2.6.2"
# Only apply this check if we are in AthGeneration/Athena, where MADPATH is defined...
import os
f = open(os.environ["MADPATH"]+"/VERSION")
for l in f:
if l.find("version =") == 0:
mg_version = l.replace("\n","").split(" = ")[1]
break
if 'MADPATH' in os.environ:
f = open(os.environ["MADPATH"]+"/VERSION")
for l in f:
if l.find("version =") == 0:
mg_version = l.replace("\n","").split(" = ")[1]
break
from distutils.version import StrictVersion
if StrictVersion(mg_version) < StrictVersion('2.6.2'):
Loading