2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-24 23:48:24 +00:00

Merge pull request #614 from codingCoffee/613

develop fixes for centos
This commit is contained in:
Ameya Shenoy 2018-03-27 00:54:25 +05:30 committed by GitHub
commit d5a9734f6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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