updating for python3
This commit is contained in:
parent
15ffc7ac8c
commit
4eba2cbf5a
8 changed files with 16 additions and 20 deletions
|
|
@ -76,8 +76,6 @@ def setup_rootpath():
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def bootstrap():
|
def bootstrap():
|
||||||
import database as db
|
|
||||||
|
|
||||||
configuration = env.config
|
configuration = env.config
|
||||||
|
|
||||||
if env.debug:
|
if env.debug:
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ from fabric.contrib.files import exists
|
||||||
from .utils import loggify, print_run, booleanize
|
from .utils import loggify, print_run, booleanize
|
||||||
from .utils import generate_template_build_path
|
from .utils import generate_template_build_path
|
||||||
from .utils import generate_template_files_path
|
from .utils import generate_template_files_path
|
||||||
|
from .utils import handle_help
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
@ -145,7 +146,6 @@ def startapp(appname='help'):
|
||||||
\tappname - the name of the app you want to start
|
\tappname - the name of the app you want to start
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from utils import handle_help
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if handle_help(appname, msg_help, 'help'):
|
if handle_help(appname, msg_help, 'help'):
|
||||||
|
|
@ -317,7 +317,7 @@ def generate_scripts(template_name, make_copy=False):
|
||||||
backup_cmd = "cp {copy_full_path} " \
|
backup_cmd = "cp {copy_full_path} " \
|
||||||
"{copy_full_path}.bak".format(copy_full_path=copy_full_path)
|
"{copy_full_path}.bak".format(copy_full_path=copy_full_path)
|
||||||
|
|
||||||
from utils import upload_template as utils_upload_template
|
from .utils import upload_template as utils_upload_template
|
||||||
|
|
||||||
if env.debug:
|
if env.debug:
|
||||||
logger.debug("template_name : %s" % template_name)
|
logger.debug("template_name : %s" % template_name)
|
||||||
|
|
@ -501,7 +501,7 @@ def generate_gunicorn(make_link=True):
|
||||||
|
|
||||||
logger.debug('\n%s' % print_run(msg_link_gunicorn))
|
logger.debug('\n%s' % print_run(msg_link_gunicorn))
|
||||||
|
|
||||||
from utils import upload_template as utils_upload_template
|
from .utils import upload_template as utils_upload_template
|
||||||
|
|
||||||
upload_msg = utils_upload_template(
|
upload_msg = utils_upload_template(
|
||||||
filename=configuration.templates.gunicorn.conf.src,
|
filename=configuration.templates.gunicorn.conf.src,
|
||||||
|
|
@ -538,7 +538,7 @@ def edit(param='help'):
|
||||||
calls up mvim on the gunicorn conf file
|
calls up mvim on the gunicorn conf file
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from maintenance import edit as maintenance_edit
|
from .maintenance import edit as maintenance_edit
|
||||||
|
|
||||||
configuration = env.config
|
configuration = env.config
|
||||||
|
|
||||||
|
|
@ -712,7 +712,7 @@ def fixtures(appname=None, backup=False):
|
||||||
|
|
||||||
print("debug - path_fixture: %s" % path_fixture)
|
print("debug - path_fixture: %s" % path_fixture)
|
||||||
|
|
||||||
from utils import ensure_dir
|
from .utils import ensure_dir
|
||||||
ensure_dir(path_data)
|
ensure_dir(path_data)
|
||||||
ensure_dir(path_backup)
|
ensure_dir(path_backup)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ def setup_virtualenv():
|
||||||
format='\n%(levelname)s: deploy.setup_virtualenv %(message)s',
|
format='\n%(levelname)s: deploy.setup_virtualenv %(message)s',
|
||||||
level=logging.DEBUG)
|
level=logging.DEBUG)
|
||||||
|
|
||||||
mkvirtualenv_cmd = "mkvirtualenv --no-site-packages --python=`which python3` " \
|
mkvirtualenv_cmd = "mkvirtualenv --no-site-packages " \
|
||||||
"{virtualenv_name}".format(
|
"--python=`which python3` {virtualenv_name}".format(
|
||||||
virtualenv_name=configuration.virtualenv.name)
|
virtualenv_name=configuration.virtualenv.name)
|
||||||
|
|
||||||
if env.debug:
|
if env.debug:
|
||||||
|
|
@ -147,7 +147,7 @@ def freeze(param='help'):
|
||||||
\tFalse (default) - print the freeze output to the console
|
\tFalse (default) - print the freeze output to the console
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from utils import booleanize, handle_help
|
from .utils import booleanize, handle_help
|
||||||
|
|
||||||
if handle_help(param, msg_help, 'help'):
|
if handle_help(param, msg_help, 'help'):
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
@ -209,7 +209,7 @@ def copyto(branch):
|
||||||
"This will simply copy over \n\tthe requirements file for "
|
"This will simply copy over \n\tthe requirements file for "
|
||||||
"this branch with itself", ERROR_BAD_BRANCH_PARAM)
|
"this branch with itself", ERROR_BAD_BRANCH_PARAM)
|
||||||
|
|
||||||
from initialize import get_config
|
from .initialize import get_config
|
||||||
|
|
||||||
branch_config = get_config(branch)
|
branch_config = get_config(branch)
|
||||||
|
|
||||||
|
|
@ -228,10 +228,10 @@ def copyto(branch):
|
||||||
"destination branch '{branch_dst}'. Continue? Y/n ".format(
|
"destination branch '{branch_dst}'. Continue? Y/n ".format(
|
||||||
branch_src=configuration.project.branch, branch_dst=branch)
|
branch_src=configuration.project.branch, branch_dst=branch)
|
||||||
|
|
||||||
from utils import prompt_continue
|
from .utils import prompt_continue
|
||||||
prompt_continue(message=message)
|
prompt_continue(message=message)
|
||||||
|
|
||||||
from utils import upload_template
|
from .utils import upload_template
|
||||||
upload_template(
|
upload_template(
|
||||||
filename=configuration.virtualenv.requirements.filename,
|
filename=configuration.virtualenv.requirements.filename,
|
||||||
destination=branch_local_path,
|
destination=branch_local_path,
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,7 @@ def upload():
|
||||||
logger.debug("run(%s)" % copy_command)
|
logger.debug("run(%s)" % copy_command)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
import utils
|
from . import utils
|
||||||
utils.printvar("files_path", files_path)
|
utils.printvar("files_path", files_path)
|
||||||
|
|
||||||
upload_template(
|
upload_template(
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ BRANCH = '{{ project_branch }}'
|
||||||
|
|
||||||
from {{ project_name }}.settings import *
|
from {{ project_name }}.settings import *
|
||||||
|
|
||||||
import initialize
|
from modules import initialize
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOCAL_LOGGING_PREFIX = "%s %%(message)s" % BRANCH
|
LOCAL_LOGGING_PREFIX = "%s %%(message)s" % BRANCH
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ PROJECT_ROOT = os.path.abspath(os.path.join(BASE_DIR, os.pardir))
|
||||||
# infomration for the settings file
|
# infomration for the settings file
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(
|
sys.path.insert(0, os.path.join(
|
||||||
PROJECT_ROOT, 'usr', 'bin', 'fabric', 'modules'))
|
PROJECT_ROOT, 'usr', 'bin', 'fabric'))
|
||||||
|
|
||||||
#
|
#
|
||||||
# add an "apps" directory to this project, which is where all the apps
|
# add an "apps" directory to this project, which is where all the apps
|
||||||
|
|
@ -60,7 +60,6 @@ MIDDLEWARE = [
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
|
||||||
'django.contrib.messages.middleware.MessageMiddleware',
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ BRANCH = '{{ project_branch }}'
|
||||||
|
|
||||||
from {{ project_name }}.settings import *
|
from {{ project_name }}.settings import *
|
||||||
|
|
||||||
import initialize
|
from modules import initialize
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOCAL_LOGGING_PREFIX = "%s %%(message)s" % BRANCH
|
LOCAL_LOGGING_PREFIX = "%s %%(message)s" % BRANCH
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ PROJECT_ROOT = os.path.abspath(os.path.join(BASE_DIR, os.pardir))
|
||||||
# infomration for the settings file
|
# infomration for the settings file
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(
|
sys.path.insert(0, os.path.join(
|
||||||
PROJECT_ROOT, 'usr', 'bin', 'fabric', 'modules'))
|
PROJECT_ROOT, 'usr', 'bin', 'fabric'))
|
||||||
|
|
||||||
#
|
#
|
||||||
# add an "apps" directory to this project, which is where all the apps
|
# add an "apps" directory to this project, which is where all the apps
|
||||||
|
|
@ -60,7 +60,6 @@ MIDDLEWARE = [
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
|
||||||
'django.contrib.messages.middleware.MessageMiddleware',
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue