2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00

better coding practices

This commit is contained in:
Ameya Shenoy 2018-04-17 16:30:11 +05:30
parent 642935a8a8
commit c6e559b8b9
No known key found for this signature in database
GPG Key ID: AC016A555657D0A3

View File

@ -171,13 +171,14 @@ def which(executable, raise_err = False):
def setup_env(bench_path='.', python = 'python'):
python = which(python, raise_err = True)
pip = os.path.join(bench_path, 'env', 'bin', 'pip')
exec_cmd('virtualenv -q {} -p {}'.format('env', python), cwd=bench_path)
exec_cmd('./env/bin/pip -q install --upgrade pip', cwd=bench_path)
exec_cmd('./env/bin/pip -q install wheel', cwd=bench_path)
# exec_cmd('./env/bin/pip -q install https://github.com/frappe/MySQLdb1/archive/MySQLdb-1.2.5-patched.tar.gz', cwd=bench_path)
exec_cmd('./env/bin/pip -q install six', cwd=bench_path)
exec_cmd('./env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit', cwd=bench_path)
exec_cmd('{} -q install --upgrade pip'.format(pip), cwd=bench_path)
exec_cmd('{} -q install wheel'.format(pip), cwd=bench_path)
# exec_cmd('{pip} -q install https://github.com/frappe/MySQLdb1/archive/MySQLdb-1.2.5-patched.tar.gz'.format(pip), cwd=bench_path)
exec_cmd('{} -q install six'.format(pip), cwd=bench_path)
exec_cmd('{} -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit'.format(pip), cwd=bench_path)
def setup_socketio(bench_path='.'):
exec_cmd("npm install socket.io redis express superagent cookie babel-core less chokidar \