keep version in separate file
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index 4391764..60bec4f 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -1 +1 @@
-__version__ = '4.0.2'
+from erpnext.__version__ import __version__
diff --git a/erpnext/__version__.py b/erpnext/__version__.py
new file mode 100644
index 0000000..4391764
--- /dev/null
+++ b/erpnext/__version__.py
@@ -0,0 +1 @@
+__version__ = '4.0.2'
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index a488b31..58341ca 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -1,10 +1,11 @@
+from erpnext.__version__ import __version__
 app_name = "erpnext"
 app_title = "ERPNext"
 app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors"
 app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations"
 app_icon = "icon-th"
 app_color = "#e74c3c"
-app_version = "4.0.0-wip"
+app_version = __version__
 
 app_include_js = "assets/js/erpnext.min.js"
 app_include_css = "assets/css/erpnext.css"
diff --git a/setup.py b/setup.py
index c62a6a8..0004998 100644
--- a/setup.py
+++ b/setup.py
@@ -1,14 +1,13 @@
 from setuptools import setup, find_packages
+from erpnext.__version__ import __version__
 import os
 
-version = '4.0.2'
-
 with open("requirements.txt", "r") as f:
 	install_requires = f.readlines()
 
 setup(
     name='erpnext',
-    version=version,
+    version=__version__,
     description='Open Source ERP',
     author='Web Notes Technologies',
     author_email='info@erpnext.com',