From 5eda979fdfd005eff962524bda730a20061b103d Mon Sep 17 00:00:00 2001 From: Necoro <> Date: Sun, 7 Oct 2007 17:53:49 +0000 Subject: first catapult support --- portato/backend/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'portato/backend/__init__.py') 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 -- cgit v1.2.3-54-g00ecf