import logging
from distutils.dir_util import copy_tree
-from tools import chmodRecursive
-from db import DB
-from config import Conf
-from workplace import Workplace
-from exceptions import *
+from .tools import chmodRecursive
+from .db import DB
+from .config import Conf
+from .workplace import Workplace
+from .exceptions import *
C = Conf()
jason = 'info.json'
@property
def Wp(self):
if not self.__Wp:
- import workplace
- self.__Wp = workplace.Workplace()
+ from .workplace import Workplace
+ self.__Wp = Workplace()
return self.__Wp
def getCommand(cmd):
"""Lazy loading of a command class. Millseconds saved, hurray!"""
cls = cmd.capitalize() + 'Command'
- return getattr(getattr(getattr(__import__('lib.%s.%s' % ('commands', cmd)), 'commands'), cmd), cls)
+ return getattr(getattr(getattr(__import__('mdk.%s.%s' % ('commands', cmd)), 'commands'), cmd), cls)
commandsList = [
'alias',
"""
import argparse
-from lib.command import Command
+from ..command import Command
class AliasCommand(Command):
"""
import logging
-from lib import tools, css, jira
-from lib.command import Command
-from lib.tools import yesOrNo
+from .. import tools, css, jira
+from ..command import Command
+from ..tools import yesOrNo
class BackportCommand(Command):
import time
import logging
from distutils.errors import DistutilsFileError
-from lib.command import Command
-from lib import backup
-from lib.exceptions import *
+from .. import backup
+from ..command import Command
+from ..exceptions import *
class BackupCommand(Command):
import logging
import gzip
from time import sleep
-from lib.command import Command
-from lib.tools import process, ProcessInThread, downloadProcessHook
+from ..command import Command
+from ..tools import process, ProcessInThread, downloadProcessHook
class BehatCommand(Command):
"""
import logging
-from lib.command import Command
-from lib.tools import launchEditor, yesOrNo
-from lib.config import ConfigObject, ConfigFileCouldNotBeLoaded
+from ..command import Command
+from ..tools import launchEditor, yesOrNo
+from ..config import ConfigObject, ConfigFileCouldNotBeLoaded
class ConfigCommand(Command):
import re
import logging
-from lib.db import DB
-from lib.command import Command
-from lib.tools import yesOrNo
-from lib.exceptions import CreateException, InstallException
+from ..db import DB
+from ..command import Command
+from ..tools import yesOrNo
+from ..exceptions import CreateException, InstallException
class CreateCommand(Command):
import time
import watchdog.events
import watchdog.observers
-from lib.command import Command
-from lib import css
+from .. import css
+from ..command import Command
class CssCommand(Command):
import shutil
import imp
import subprocess
-from lib import git
-from lib.command import Command
-from lib.tools import mkdir, resolveEditor
+from .. import git
+from ..command import Command
+from ..tools import mkdir, resolveEditor
class DoctorCommand(Command):
import logging
-from lib.command import Command
+from ..command import Command
class FixCommand(Command):
"""
import logging
-from lib.command import Command
+from ..command import Command
class InfoCommand(Command):
import subprocess
import logging
-from lib.command import Command
-from lib.tools import question, get_current_user, mkdir
+from ..command import Command
+from ..tools import question, get_current_user, mkdir
class InitCommand(Command):
pass
# Loading the configuration.
- from lib.config import Conf as Config
+ from ..config import Conf as Config
C = Config(userfile=userconfigfile)
# Asks the user what needs to be asked.
import os
import logging
-from lib import db
-from lib.command import Command
-from lib.tools import mkdir
+from .. import db
+from ..command import Command
+from ..tools import mkdir
DB = db.DB
import time
import watchdog.events
import watchdog.observers
-from lib.command import Command
-from lib import js, plugins
+from ..command import Command
+from .. import js, plugins
class JsCommand(Command):
import os
import gzip
import urllib
-from lib.command import Command
-from lib.tools import process
+from ..command import Command
+from ..tools import process
class PhpunitCommand(Command):
http://github.com/FMCorz/mdk
"""
-from lib.plugins import *
-from lib.command import Command
+from ..plugins import *
+from ..command import Command
class PluginCommand(Command):
import os
import logging
from datetime import datetime
-from lib import tools, jira, fetch
-from lib.command import Command
-from lib.tools import question
+from .. import tools, jira, fetch
+from ..command import Command
+from ..tools import question
class PullCommand(Command):
"""
import logging
-from lib.command import Command
+from ..command import Command
class PurgeCommand(Command):
"""
import logging
-import re
-from lib import tools, jira
-from lib.command import Command
-from lib.tools import getMDLFromCommitMessage
+from .. import tools, jira
+from ..command import Command
+from ..tools import getMDLFromCommitMessage
class PushCommand(Command):
"""
import logging
-from lib.command import Command
+from ..command import Command
class RebaseCommand(Command):
"""
import logging
-from lib.command import Command
+from ..command import Command
class RemoveCommand(Command):
"""
import logging
-from lib.command import Command
-from lib.scripts import Scripts
+from ..command import Command
+from ..scripts import Scripts
class RunCommand(Command):
from datetime import datetime
import textwrap
import re
-from lib.command import Command
-from lib.jira import Jira
-from lib.tools import parseBranch
+from ..command import Command
+from ..jira import Jira
+from ..tools import parseBranch
class TrackerCommand(Command):
"""
import logging
-from lib.command import Command
+from ..command import Command
class UninstallCommand(Command):
import sys
import logging
-from lib.command import Command
-from lib.exceptions import UpgradeNotAllowed
+from ..command import Command
+from ..exceptions import UpgradeNotAllowed
class UpdateCommand(Command):
import sys
import logging
-from lib.command import Command
-from lib.exceptions import UpgradeNotAllowed
+from ..command import Command
+from ..exceptions import UpgradeNotAllowed
class UpgradeCommand(Command):
import logging
import os
-from tools import process
-from config import Conf
+from .tools import process
+from .config import Conf
C = Conf()
"""
import json
-from tools import question
-from config import Conf
+from .tools import question
+from .config import Conf
from urlparse import urlparse
from datetime import datetime
import re
import logging
import os
-from tools import process
-from config import Conf
-from plugins import PluginManager
+from .tools import process
+from .config import Conf
+from .plugins import PluginManager
C = Conf()
import os
import re
import logging
-from lib.command import CommandRunner
-from lib.commands import getCommand, commandsList
-from lib.config import Conf
-from lib.tools import process
-from version import __version__
+from .command import CommandRunner
+from .commands import getCommand, commandsList
+from .config import Conf
+from .tools import process
+from .version import __version__
C = Conf()
import shutil
from tempfile import gettempdir
-from tools import getMDLFromCommitMessage, mkdir, process, parseBranch
-from db import DB
-from config import Conf
-from git import Git, GitException
-from exceptions import InstallException, UpgradeNotAllowed
-from jira import Jira, JiraException
-from scripts import Scripts
+from .tools import getMDLFromCommitMessage, mkdir, process, parseBranch
+from .db import DB
+from .config import Conf
+from .git import Git, GitException
+from .exceptions import InstallException, UpgradeNotAllowed
+from .jira import Jira, JiraException
+from .scripts import Scripts
C = Conf()
import re
import shutil
from tempfile import gettempdir
-from config import Conf
-import tools
+from .config import Conf
+from . import tools
C = Conf()
import shutil
import stat
import logging
-from tools import process
-from config import Conf
-from exceptions import ScriptNotFound, ConflictInScriptName, UnsupportedScript
+from .tools import process
+from .config import Conf
+from .exceptions import ScriptNotFound, ConflictInScriptName, UnsupportedScript
C = Conf()
import logging
import hashlib
import tempfile
-from lib.config import Conf
+from .config import Conf
C = Conf()
import os
import shutil
import logging
-from tools import mkdir, process, stableBranch
-from exceptions import CreateException
-from config import Conf
-import git
-import moodle
+from .tools import mkdir, process, stableBranch
+from .exceptions import CreateException
+from .config import Conf
+from . import git
+from . import moodle
C = Conf()