diff --git a/README.md b/README.md
index 99821775..9b44dcb9 100755
--- a/README.md
+++ b/README.md
@@ -10,17 +10,32 @@ If you have questions, please ask them on our [forum](https://discuss.erpnext.co
Installation
============
-Production vs Development
---------------------
-
-| Production | Development |
-|--------------------------------------------------------------------------|-------------------------------------------------------------------|
-| The Production setup uses Nginx and Supervisor | The development setup uses Socketio. |
-| This setup isn't meant for instant updates in code. | Any code changes will be reflected instantly. |
-| Background services handle all the work, and they start with the system. | You need to explicitly start your server by running `bench start` |
-| Uses Celery for job queuing | Uses RQ for queuing |
-| Installs with master branch | Installs with develop branch |
-
+
+
+ Production Setup |
+ Development Setup |
+
+
+ Installs with master branch |
+ Installs with develop branch |
+
+
+ The Production setup uses Nginx, and uses Supervisor to manage processes |
+ The development setup uses Honcho to manage processes (bench start) |
+
+
+ This setup isn't meant for instant updates in code. |
+ Any code changes will be reflected instantly. |
+
+
+ Background services handle all the work, and they start with the system. |
+ You need to explicitly start your server |
+
+
+ Uses Celery for job queuing (Frappe 6) |
+ Uses RQ for job queuing (Frappe 7) |
+
+
Easy Setup
---------------------
@@ -34,20 +49,29 @@ Open your Terminal and enter:
####For Production:
+
```
+Mac OSX:
+curl "https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh" -o "setup_frappe.sh"
+
+Linux:
wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
+
sudo bash setup_frappe.sh --setup-production
```
-This will install Frappe and ERPNext with Supervisor, Nginx and Celery. Supervisor will keep all services working in the background and make sure they all run.
####For Development:
> We recommend using the [Beta Development Setup](#beta-development-setup) if it supports your OS
```
+Mac OSX:
+curl "https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh" -o "setup_frappe.sh"
+
+Linux:
wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
sudo bash setup_frappe.sh --bench-branch develop
```
-This will install with Socketio and Redis Queue. You have to explicitly start services by running `bench start`.
+You have to explicitly start services by running `bench start`.
####Script Options:
```
@@ -67,10 +91,17 @@ Beta Development Setup
Tested on Ubuntu 14.04 to 15.x, Debian 7+, CentOS 7+, and MacOS X. If you find any problems, post them on our forum: [https://discuss.erpnext.com](https://discuss.erpnext.com)
```
+Linux:
wget https://raw.githubusercontent.com/frappe/bench/develop/playbooks/install.py
+
+Mac OSX:
+curl "https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py" -o install.py
+
python install.py --develop
```
-This will install with Socketio and Redis Queue. You have to explicitly start services by running `bench start`. This script requires Python2.7+ installed on your machine. You need to run this with a user that is **not** `root`, but can `sudo`. If you don't have such a user, you can search the web for *How to add a new user in { your OS }* and *How to add an existing user to sudoers in { your OS }*.
+You have to explicitly start services by running `bench start`. This script requires Python2.7+ installed on your machine. You need to run this with a user that is **not** `root`, but can `sudo`. If you don't have such a user, you can search the web for *How to add a new user in { your OS }* and *How to add an existing user to sudoers in { your OS }*.
+
+On Mac OS X, you will have to create a group with the same name as *{ your User }*. On creating this group, you have to assign *{ your User }* to it. You can do this by going to "System preferences" -> "Users & Groups" -> "+" (as if you were adding new account) -> Under "New account" select "Group" -> Type in group name -> "Create group"
This script will:
@@ -103,6 +134,8 @@ You can also run the parts of the bench selectively.
`bench update --bench` will only update the bench utility (this project)
+`bench update --requirements` will only update dependencies (python packages) for the apps installed
+
Guides
=======
diff --git a/bench/app.py b/bench/app.py
index 5a2f1dfc..8be35cd1 100755
--- a/bench/app.py
+++ b/bench/app.py
@@ -155,7 +155,7 @@ def get_current_version(app, bench='.'):
except AttributeError:
# backward compatibility
with open(os.path.join(repo_dir, 'setup.py')) as f:
- return get_version_from_string(f.read())
+ return get_version_from_string(f.read(), field='version')
def get_upstream_version(app, branch=None, bench='.'):
repo_dir = get_repo_dir(app, bench=bench)
@@ -240,8 +240,8 @@ def switch_to_v4(apps=None, bench='.', upgrade=False):
def switch_to_v5(apps=None, bench='.', upgrade=False):
switch_branch('v5.x.x', apps=apps, bench=bench, upgrade=upgrade)
-def get_version_from_string(contents):
- match = re.search(r"^(\s*%s\s*=\s*['\\\"])(.+?)(['\"])(?sm)" % '__version__',
+def get_version_from_string(contents, field='__version__'):
+ match = re.search(r"^(\s*%s\s*=\s*['\\\"])(.+?)(['\"])(?sm)" % field,
contents)
return match.group(2)
diff --git a/install_scripts/setup_frappe.sh b/install_scripts/setup_frappe.sh
index 0e81b118..56eb7078 100755
--- a/install_scripts/setup_frappe.sh
+++ b/install_scripts/setup_frappe.sh
@@ -212,11 +212,14 @@ install_packages() {
supervisor python-pip fontconfig libxrender1 libxext6 xfonts-75dpi xfonts-base nodejs
if [ $OS_VER == "precise" ]; then
- run_cmd sudo apt-get install -y libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk
+ run_cmd sudo apt-get install -y libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev \
+ liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk
elif [ $OS_VER == "8" ]; then
- run_cmd sudo apt-get install -y libtiff5-dev libjpeg62-turbo-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk
+ run_cmd sudo apt-get install -y libtiff5-dev libjpeg62-turbo-dev zlib1g-dev libfreetype6-dev \
+ liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk npm
else
- run_cmd sudo apt-get install -y libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
+ run_cmd sudo apt-get install -y libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev \
+ liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
fi
echo "Installing wkhtmltopdf"