from distutils.core import setup
import py2exe
import sys
import os

dsa_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))), "re")
print "dsa_path = %s"%(dsa_path)
sys.path.append(dsa_path)
try:
    import dsaversion
except:
    class temp:
        def __init__(self):
            self.version_info = {}
            self.version_info['software_version'] = "0.0"
            self.version_info['software_revision'] = "0001"
    dsaversion = temp()

if len(sys.argv) == 1:
    sys.argv.append("py2exe")
    sys.argv.append("-b 1")

class Target:
    def __init__(self, **kw):
        self.__dict__.update(kw)
        self.version = "%s.%s"%(dsaversion.version_info['software_version'],
                                dsaversion.version_info['software_revision'])
        self.company_name = "RedHat"
        self.copyright = "Copyright(C) RedHat LTD"
        self.name = "RHEVM Net Console "


vdsAgentTarget = Target(
    description = "RHEVM Net Console Service",
    modules = ["pyNetConsoleService"]
    )

setup(
    service = [vdsAgentTarget],
    zipfile=None,
    )

