Esempio n. 1
0
# check python version is high enough
check_python_version(2, 6, __file__)

if 'VIRTUAL_ENV' in os.environ:
    ve_dir = os.environ['VIRTUAL_ENV']
else:
    from project_settings import local_vcs_root, relative_ve_dir
    ve_dir = path.join(local_vcs_root, relative_ve_dir)

if not os.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)

# depending on how you've installed dye, you may need to edit this line
tasks = path.join(ve_dir, 'bin', 'tasks.py')

current_dir = path.dirname(__file__)

# call the tasks.py in the virtual env
tasks_call = [tasks]

# Find the deployment directory depending on the deployment target. Failing that,
# use the current path to determine if we are using a custom deployment directory.
Esempio n. 2
0
# check python version is high enough
check_python_version(2, 6, __file__)

if 'VIRTUAL_ENV' in os.environ:
    ve_dir = os.environ['VIRTUAL_ENV']
else:
    from project_settings import local_vcs_root, relative_ve_dir
    ve_dir = path.join(local_vcs_root, relative_ve_dir)

if not os.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)

# depending on how you've installed dye, you may need to edit this line
tasks = path.join(ve_dir, 'bin', 'tasks.py')

current_dir = path.dirname(__file__)

# call the tasks.py in the virtual env
tasks_call = [tasks]

# Find the deployment directory depending on the deployment target. Failing that,
# use the current path to determine if we are using a custom deployment directory.
Esempio n. 3
0
# check python version is high enough
check_python_version(2, 6, __file__)

if 'VIRTUAL_ENV' in os.environ:
    ve_dir = os.environ['VIRTUAL_ENV']
else:
    from project_settings import local_vcs_root, relative_ve_dir
    ve_dir = path.join(local_vcs_root, relative_ve_dir)

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')
Esempio n. 4
0
check_python_version(2, 6, __file__)

if "VIRTUAL_ENV" in os.environ:
    ve_dir = os.environ["VIRTUAL_ENV"]
else:
    from project_settings import local_vcs_root, relative_ve_dir

    ve_dir = path.join(local_vcs_root, relative_ve_dir)

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")