From f357adcd9a927a47357113220aeb8e6b5e4b2aa8 Mon Sep 17 00:00:00 2001 From: kakwa Date: Thu, 6 Apr 2017 20:34:32 +0200 Subject: [PATCH] put version in standalone file this way, it avoids error due to missing imports --- docs/conf.py | 2 +- goodies/tag.sh | 2 +- ldapcherry/__init__.py | 2 -- ldapcherry/version.py | 8 ++++++++ setup.py | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 ldapcherry/version.py diff --git a/docs/conf.py b/docs/conf.py index 40c262c..aff3a02 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -33,7 +33,7 @@ sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) sys.path.insert(0, os.path.abspath('..')) -from ldapcherry import version +from ldapcherry.version import version # -- General configuration ----------------------------------------------------- diff --git a/goodies/tag.sh b/goodies/tag.sh index 8cb5ae7..fe9c5a5 100755 --- a/goodies/tag.sh +++ b/goodies/tag.sh @@ -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" diff --git a/ldapcherry/__init__.py b/ldapcherry/__init__.py index bfc9621..60ce654 100644 --- a/ldapcherry/__init__.py +++ b/ldapcherry/__init__.py @@ -35,8 +35,6 @@ from sets import Set SESSION_KEY = '_cp_username' -version = '0.5.1' - class LdapCherry(object): diff --git a/ldapcherry/version.py b/ldapcherry/version.py new file mode 100644 index 0000000..75f8af2 --- /dev/null +++ b/ldapcherry/version.py @@ -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' diff --git a/setup.py b/setup.py index 35a25f0..31938bd 100755 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ data_dir = os.path.join(datarootdir, 'ldapcherry') 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: