From a871cab0830ac7a696efa182ebce98a7f792579b Mon Sep 17 00:00:00 2001 From: gwen Date: Mon, 23 Jul 2012 14:39:16 +0200 Subject: [PATCH] relative imports to absolute imports (fixes #2667) --- setup.py | 2 +- {src => tiramisu}/__init__.py | 0 {src => tiramisu}/autolib.py | 2 +- {src => tiramisu}/basetype.py | 0 {src => tiramisu}/config.py | 8 ++++---- {src => tiramisu}/error.py | 0 {src => tiramisu}/option.py | 6 +++--- {src => tiramisu}/tool.py | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) rename {src => tiramisu}/__init__.py (100%) rename {src => tiramisu}/autolib.py (98%) rename {src => tiramisu}/basetype.py (100%) rename {src => tiramisu}/config.py (99%) rename {src => tiramisu}/error.py (100%) rename {src => tiramisu}/option.py (99%) rename {src => tiramisu}/tool.py (97%) diff --git a/setup.py b/setup.py index b523bb8..b425011 100644 --- a/setup.py +++ b/setup.py @@ -9,6 +9,6 @@ setup( version='1.0', description='configuration management tool', url='http://labs.libre-entreprise.org/projects/tiramisu', - package_dir = {'tiramisu':'src'}, + package_dir = {'tiramisu':'tiramisu'}, packages=['tiramisu'] ) diff --git a/src/__init__.py b/tiramisu/__init__.py similarity index 100% rename from src/__init__.py rename to tiramisu/__init__.py diff --git a/src/autolib.py b/tiramisu/autolib.py similarity index 98% rename from src/autolib.py rename to tiramisu/autolib.py index 988a6b2..febc172 100644 --- a/src/autolib.py +++ b/tiramisu/autolib.py @@ -19,7 +19,7 @@ # the whole pypy projet is under MIT licence # ____________________________________________________________ "enables us to carry out a calculation and return an option's value" -from error import DisabledOptionError, SpecialOwnersError +from tiramisu.error import DisabledOptionError, SpecialOwnersError # ____________________________________________________________ # automatic Option object special_owners = ['auto', 'fill'] diff --git a/src/basetype.py b/tiramisu/basetype.py similarity index 100% rename from src/basetype.py rename to tiramisu/basetype.py diff --git a/src/config.py b/tiramisu/config.py similarity index 99% rename from src/config.py rename to tiramisu/config.py index 851ac77..5a0c748 100644 --- a/src/config.py +++ b/tiramisu/config.py @@ -20,14 +20,14 @@ # the rough pypy's guys: http://codespeak.net/svn/pypy/dist/pypy/config/ # the whole pypy projet is under MIT licence # ____________________________________________________________ -from error import (HiddenOptionError, ConfigError, NotFoundError, +from copy import copy +from tiramisu.error import (HiddenOptionError, ConfigError, NotFoundError, AmbigousOptionError, ConflictConfigError, NoMatchingOptionFound, SpecialOwnersError, MandatoryError, MethodCallError, DisabledOptionError, ModeOptionError) -from option import (OptionDescription, Option, SymLinkOption, group_types, +from tiramisu.option import (OptionDescription, Option, SymLinkOption, group_types, Multi, apply_requires, modes) -from autolib import special_owners, special_owner_factory -from copy import copy +from tiramisu.autolib import special_owners, special_owner_factory # ______________________________________________________________________ # generic owner. 'default' is the general config owner after init time default_owner = 'user' diff --git a/src/error.py b/tiramisu/error.py similarity index 100% rename from src/error.py rename to tiramisu/error.py diff --git a/src/option.py b/tiramisu/option.py similarity index 99% rename from src/option.py rename to tiramisu/option.py index d6de739..e6d8678 100644 --- a/src/option.py +++ b/tiramisu/option.py @@ -20,9 +20,9 @@ # the rough pypy's guys: http://codespeak.net/svn/pypy/dist/pypy/config/ # the whole pypy projet is under MIT licence # ____________________________________________________________ -from autolib import special_owners -from basetype import HiddenBaseType, DisabledBaseType, ModeBaseType, modes -from error import (ConfigError, ConflictConfigError, NotFoundError, +from tiramisu.autolib import special_owners +from tiramisu.basetype import HiddenBaseType, DisabledBaseType, ModeBaseType, modes +from tiramisu.error import (ConfigError, ConflictConfigError, NotFoundError, SpecialOwnersError, RequiresError) available_actions = ['hide', 'show', 'enable', 'disable'] reverse_actions = {'hide': 'show', 'show': 'hide', diff --git a/src/tool.py b/tiramisu/tool.py similarity index 97% rename from src/tool.py rename to tiramisu/tool.py index 9a31c45..229703f 100644 --- a/src/tool.py +++ b/tiramisu/tool.py @@ -17,8 +17,8 @@ # The original `Config` design model is unproudly borrowed from # the rough gus of pypy: pypy: http://codespeak.net/svn/pypy/dist/pypy/config/ # the whole pypy projet is under MIT licence -from config import Config -from option import (OptionDescription, Option, ChoiceOption, BoolOption, +from tiramisu.config import Config +from tiramisu.option import (OptionDescription, Option, ChoiceOption, BoolOption, FloatOption, StrOption, IntOption, IPOption, NetmaskOption, ArbitraryOption, group_types, apply_requires)