summaryrefslogtreecommitdiff
path: root/portato/backend/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'portato/backend/__init__.py')
-rw-r--r--portato/backend/__init__.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/portato/backend/__init__.py b/portato/backend/__init__.py
index 92b77a8..16cebe6 100644
--- a/portato/backend/__init__.py
+++ b/portato/backend/__init__.py
@@ -12,10 +12,14 @@
from __future__ import absolute_import
+from ..constants import USE_CATAPULT
from .system_interface import SystemInterface
from .exceptions import BlockedException, PackageNotFoundException, DependencyCalcError, InvalidSystemError
-SYSTEM = "portage" # the name of the current system
+if USE_CATAPULT:
+ SYSTEM = "catapult"
+else:
+ SYSTEM = "portage" # the name of the current system
_sys = None # the SystemInterface-instance
class _Package (object):
@@ -53,6 +57,9 @@ def load_system ():
if SYSTEM == "portage":
from .portage import PortageSystem
_sys = PortageSystem ()
+ elif SYSTEM == "catapult":
+ from .catapult import CatapultSystem
+ _sys = CatapultSystem()
else:
raise InvalidSystemError, SYSTEM