Skip to content

Commit

Permalink
put version in standalone file
Browse files Browse the repository at this point in the history
this way, it avoids error due to missing imports
  • Loading branch information
kakwa committed Apr 6, 2017
1 parent e7998ce commit f357adc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __getattr__(cls, name):

sys.path.insert(0, os.path.abspath('..'))

from ldapcherry import version
from ldapcherry.version import version

# -- General configuration -----------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion goodies/tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

cd `dirname $0`/../

version=`sed -e "s/version\ * = \ *'\(.*\)'.*/\1/;tx;d;:x" ./ldapcherry/__init__.py`
version=`sed -e "s/version\ * = \ *'\(.*\)'.*/\1/;tx;d;:x" ./ldapcherry/version.py`

git tag "$version"
git push origin "$version"
2 changes: 0 additions & 2 deletions ldapcherry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@

SESSION_KEY = '_cp_username'

version = '0.5.1'


class LdapCherry(object):

Expand Down
8 changes: 8 additions & 0 deletions ldapcherry/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
# vim:set expandtab tabstop=4 shiftwidth=4:
#
# The MIT License (MIT)
# ldapCherry
# Copyright (c) 2014 Carpentier Pierre-Francois

version = '0.5.2'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
config_dir = os.path.join(sysconfdir, 'ldapcherry')
small_description = 'A simple web application to manage Ldap entries'

from ldapcherry import version
from ldapcherry.version import version

# change requirements according to python version
if sys.version_info[0] == 2:
Expand Down

0 comments on commit f357adc

Please sign in to comment.