示例#1
0
文件: crabsys.py 项目: s10i/crabsys
def main():
    args = parseArguments()

    args_config = {}
    if args.update_dependencies:
        args_config["update_dependencies"] = args.update_dependencies

    loadConfiguration(args.config_file_path, args_config)

    if args.action == 'build':
        context = Context(directory=os.path.abspath(args.path))

        for target in context.targets:
            target.process()
            target.build()
    else:
        print "Action not supported: %s" % (args.action)
示例#2
0
文件: __init__.py 项目: geonux/PyWPS
    def __init__(self, method=METHOD_GET, configFiles=None):
        """Class constructor
        """

        # get settings
        config.loadConfiguration(configFiles)
        self.setLogFile()
        self.UUID = uuid.uuid1().__str__()

        self.languages = config.getConfigValue("wps","lang").split(",")
        DEFAULT_LANG = self.languages[0]

        # set default version
        self.versions = config.getConfigValue("wps","version").split(",")
        DEFAULT_VERSION = self.versions[0]

        # find out the request method
        self.method = method
示例#3
0
文件: __init__.py 项目: fanez/PyWPS
    def __init__(self, environ, configFiles=None):
        """Class constructor
        """

        # get settings
        config.loadConfiguration(configFiles, environ)
        self.setLogFile()
        self.UUID = uuid.uuid1().__str__()

        self.languages = config.getConfigValue("wps", "lang").split(",")
        DEFAULT_LANG = self.languages[0]

        # set default version
        self.versions = config.getConfigValue("wps", "version").split(",")
        DEFAULT_VERSION = self.versions[0]

        # find out the request method
        self.method = environ["REQUEST_METHOD"]
示例#4
0
文件: __init__.py 项目: gkm4d/pywps
    def __init__(self, method=METHOD_GET, configFiles=None):
        """Class constructor
        """

        # get settings, if not already loaded
        if not config.config:
            config.loadConfiguration(configFiles)
        self.setLogFile()
        self.UUID = uuid.uuid1().__str__()

        self.languages = config.getConfigValue("wps", "lang").split(",")
        DEFAULT_LANG = self.languages[0]

        # set default version
        self.versions = config.getConfigValue("wps", "version").split(",")
        DEFAULT_VERSION = self.versions[0]

        # find out the request method
        self.method = method

        # create configured output path if it does not exist and ensure it
        # is accessible
        try:
            outputPath = config.getConfigValue("server", "outputPath")
            os.makedirs(outputPath)
        except OSError:
            if not os.path.isdir(outputPath):
                raise

        # create configured temp path if it does not exist and ensure it
        # is accessible
        try:
            tempPath = config.getConfigValue("server", "tempPath")
            os.makedirs(tempPath)
        except OSError:
            if not os.path.isdir(tempPath):
                raise
示例#5
0
文件: __init__.py 项目: gkm4d/pywps
    def __init__(self, method=METHOD_GET, configFiles=None):
        """Class constructor
        """

        # get settings, if not already loaded
        if not config.config:
            config.loadConfiguration(configFiles)
        self.setLogFile()
        self.UUID = uuid.uuid1().__str__()

        self.languages = config.getConfigValue("wps","lang").split(",")
        DEFAULT_LANG = self.languages[0]

        # set default version
        self.versions = config.getConfigValue("wps","version").split(",")
        DEFAULT_VERSION = self.versions[0]

        # find out the request method
        self.method = method

        # create configured output path if it does not exist and ensure it 
        # is accessible
        try:
            outputPath = config.getConfigValue("server","outputPath")
            os.makedirs(outputPath)
        except OSError:
            if not os.path.isdir(outputPath):
                raise

        # create configured temp path if it does not exist and ensure it
        # is accessible
        try:
            tempPath = config.getConfigValue("server","tempPath")
            os.makedirs(tempPath)
        except OSError:
            if not os.path.isdir(tempPath):
                raise