Skip to content

Commit

Permalink
[fix] change in versioning: store __version__ in __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
anandpdoshi committed Jun 9, 2016
1 parent 6ba0141 commit 3f17677
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
5 changes: 4 additions & 1 deletion schools/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
from erpnext.__version__ import __version__
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

__version__ = '0.3.0'
2 changes: 0 additions & 2 deletions schools/__version__.py

This file was deleted.

2 changes: 1 addition & 1 deletion schools/hooks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import __version__ as app_version

app_name = "schools"
app_title = "ERPNext Schools"
Expand All @@ -8,7 +9,6 @@
app_icon = "octicon octicon-mortar-board"
app_color = "blue"
app_email = "[email protected]"
app_version = "0.3.0"
app_license = "GNU General Public License v3"

# setup wizard
Expand Down
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from pip.req import parse_requirements
import re, ast

# get version from __version__ variable in schools/__init__.py
_version_re = re.compile(r'__version__\s+=\s+(.*)')

with open('schools/__init__.py', 'rb') as f:
version = str(ast.literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1)))

version = '0.3.0'
requirements = parse_requirements("requirements.txt", session="")

setup(
Expand Down

0 comments on commit 3f17677

Please sign in to comment.