python: Enforce absolute imports for Python 3 compatibility

Change-Id: Ia88d7fd472f7aed9b97df81468211384981bf6c6
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15983
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
Andreas Sandberg
2019-01-25 11:46:30 +00:00
parent f59e550bc8
commit 2bad848b85
23 changed files with 84 additions and 42 deletions

View File

@@ -26,6 +26,9 @@
#
# Authors: Nathan Binkert
from __future__ import print_function
from __future__ import absolute_import
# Import useful subpackages of M5, but *only* when run as an m5
# script. This is mostly to keep backward compatibility with existing
# scripts while allowing new SCons code to operate properly.
@@ -42,14 +45,14 @@ except ImportError:
in_gem5 = False
if in_gem5:
import SimObject
import core
import objects
import params
import stats
import util
from . import SimObject
from . import core
from . import objects
from . import params
from . import stats
from . import util
from event import *
from main import main
from simulate import *
from .event import *
from .main import main
from .simulate import *