mirror of
https://github.com/frappe/bench.git
synced 2025-01-24 23:48:24 +00:00
commit
d5a9734f6c
@ -59,7 +59,7 @@ def install_bench(args):
|
||||
})
|
||||
|
||||
success = run_os_command({
|
||||
'pip': "sudo pip install ansible==2.4.1"
|
||||
'pip': "sudo pip install ansible==2.5.0"
|
||||
})
|
||||
|
||||
if not success:
|
||||
@ -82,6 +82,14 @@ def install_bench(args):
|
||||
if args.user == 'root':
|
||||
raise Exception('Please run this script as a non-root user with sudo privileges, but without using sudo or pass --user=USER')
|
||||
|
||||
# Python executable
|
||||
if not args.production:
|
||||
dist_name, dist_version = get_distribution_info()
|
||||
if dist_name=='centos':
|
||||
args.python = 'python3.6'
|
||||
else:
|
||||
args.python = 'python3'
|
||||
|
||||
# create user if not exists
|
||||
extra_vars = vars(args)
|
||||
extra_vars.update(frappe_user=args.user)
|
||||
@ -371,6 +379,11 @@ def parse_commandline_args():
|
||||
parser.add_argument('--admin-password', dest='admin_password', help='Set admin password')
|
||||
parser.add_argument('--bench-name', dest='bench_name', help='Create bench with specified name. Default name is frappe-bench')
|
||||
|
||||
# Python interpreter to be used
|
||||
parser.add_argument('--python', dest='python', default='python',
|
||||
help=argparse.SUPPRESS
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
return args
|
||||
|
@ -29,7 +29,7 @@
|
||||
register: bench_stat
|
||||
|
||||
- name: python3 bench init for develop
|
||||
command: bench init {{ bench_path }} --frappe-branch {{ branch }} --python python3
|
||||
command: bench init {{ bench_path }} --frappe-branch {{ branch }} --python {{ python }}
|
||||
args:
|
||||
creates: "{{ bench_path }}"
|
||||
when: not bench_stat.stat.exists and not production
|
||||
|
@ -1,5 +1,12 @@
|
||||
---
|
||||
|
||||
- name: Install IUS repo for python 3.6
|
||||
become: yes
|
||||
become_user: root
|
||||
yum:
|
||||
name: https://centos7.iuscommunity.org/ius-release.rpm
|
||||
state: present
|
||||
|
||||
- name: "Setup prerequisites using yum"
|
||||
become: yes
|
||||
become_user: root
|
||||
@ -23,6 +30,7 @@
|
||||
- ntp
|
||||
- openssl-devel
|
||||
- postfix
|
||||
- python36u
|
||||
- python-devel
|
||||
- python-setuptools
|
||||
- python-pip
|
||||
|
Loading…
x
Reference in New Issue
Block a user