Esempio n. 1
0
if not path.exists(ve_dir):
    print "Expected virtualenv does not exist"
    print "(required for correct version of fabric and dye)"
    print "Please run './bootstrap.py' to create virtualenv"
    sys.exit(1)

updater = UpdateVE(ve_dir=ve_dir)
if updater.virtualenv_needs_update():
    print "VirtualEnv needs to be updated"
    print 'Run deploy/bootstrap.py'
    sys.exit(1)

# if the virtualenv python version is not correct then the virtualenv
# needs updating
if not updater.check_virtualenv_python_version():
    print "VirtualEnv has wrong python version"
    print 'Run deploy/bootstrap.py'
    sys.exit(1)

fab_bin = path.join(ve_dir, 'bin', 'fab')

dye_pkg_dir = find_package_dir_in_ve(ve_dir, 'dye')
if not dye_pkg_dir:
    sys.exit('Could not find fabfile in dye package')
fabfile = path.join(dye_pkg_dir, 'dye', 'fabfile.py')

# tell fabric that this directory is where it can find project_settings and
# localfab (if it exists)
osenv = os.environ
osenv['DEPLOYDIR'] = path.dirname(__file__)
Esempio n. 2
0
if not path.exists(ve_dir):
    print "Expected virtualenv does not exist"
    print "(required for correct version of fabric and dye)"
    print "Please run './bootstrap.py' to create virtualenv"
    sys.exit(1)

updater = UpdateVE(ve_dir=ve_dir)
if updater.virtualenv_needs_update():
    print "VirtualEnv needs to be updated"
    print "Run deploy/bootstrap.py"
    sys.exit(1)

# if the virtualenv python version is not correct then the virtualenv
# needs updating
if not updater.check_virtualenv_python_version():
    print "VirtualEnv has wrong python version"
    print "Run deploy/bootstrap.py"
    sys.exit(1)

fab_bin = path.join(ve_dir, "bin", "fab")

dye_pkg_dir = find_package_dir_in_ve(ve_dir, "dye")
if not dye_pkg_dir:
    sys.exit("Could not find fabfile in dye package")
fabfile = path.join(dye_pkg_dir, "dye", "fabfile.py")

# tell fabric that this directory is where it can find project_settings and
# localfab (if it exists)
osenv = os.environ
osenv["DEPLOYDIR"] = path.dirname(__file__)