1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-26 03:04:30 +01:00

put version in standalone file

this way, it avoids error due to missing imports
This commit is contained in:
kakwa 2017-04-06 20:34:32 +02:00
parent e7998ced78
commit f357adcd9a
5 changed files with 11 additions and 5 deletions

View File

@ -33,7 +33,7 @@ sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
sys.path.insert(0, os.path.abspath('..')) sys.path.insert(0, os.path.abspath('..'))
from ldapcherry import version from ldapcherry.version import version
# -- General configuration ----------------------------------------------------- # -- General configuration -----------------------------------------------------

View File

@ -2,7 +2,7 @@
cd `dirname $0`/../ 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 tag "$version"
git push origin "$version" git push origin "$version"

View File

@ -35,8 +35,6 @@ from sets import Set
SESSION_KEY = '_cp_username' SESSION_KEY = '_cp_username'
version = '0.5.1'
class LdapCherry(object): class LdapCherry(object):

8
ldapcherry/version.py Normal file
View File

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

View File

@ -17,7 +17,7 @@ data_dir = os.path.join(datarootdir, 'ldapcherry')
config_dir = os.path.join(sysconfdir, 'ldapcherry') config_dir = os.path.join(sysconfdir, 'ldapcherry')
small_description = 'A simple web application to manage Ldap entries' 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 # change requirements according to python version
if sys.version_info[0] == 2: if sys.version_info[0] == 2: