diff options
Diffstat (limited to 'mail/setup.py')
-rw-r--r-- | mail/setup.py | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/mail/setup.py b/mail/setup.py index 575a6ec..e9c3e41 100644 --- a/mail/setup.py +++ b/mail/setup.py @@ -26,11 +26,6 @@ from pkg import utils import versioneer -versioneer.versionfile_source = 'src/leap/mail/_version.py' -versioneer.versionfile_build = 'leap/mail/_version.py' -versioneer.tag_prefix = '' # tags are like 1.2.0 -versioneer.parentdir_prefix = 'leap.mail-' - trove_classifiers = [ 'Development Status :: 4 - Beta', @@ -54,7 +49,7 @@ DOWNLOAD_BASE = ('https://github.com/leapcode/leap_mail/' 'archive/%s.tar.gz') _versions = versioneer.get_versions() VERSION = _versions['version'] -VERSION_FULL = _versions['full'] +VERSION_REVISION = _versions['full-revisionid'] DOWNLOAD_URL = "" # get the short version for the download url @@ -72,6 +67,22 @@ class freeze_debianver(Command): To be used after merging the development branch onto the debian one. """ user_options = [] + template = r""" +# This file was generated by the `freeze_debianver` command in setup.py +# Using 'versioneer.py' (0.16) from +# revision-control system data, or from the parent directory name of an +# unpacked source archive. Distribution tarballs contain a pre-generated copy +# of this file. + +version_version = '{version}' +full_revisionid = '{full_revisionid}' +""" + templatefun = r""" + +def get_versions(default={}, verbose=False): + return {'version': version_version, + 'full-revisionid': full_revisionid} +""" def initialize_options(self): pass @@ -85,24 +96,9 @@ class freeze_debianver(Command): if proceed != "y": print("He. You scared. Aborting.") return - template = r""" -# This file was generated by the `freeze_debianver` command in setup.py -# Using 'versioneer.py' (0.7+) from -# revision-control system data, or from the parent directory name of an -# unpacked source archive. Distribution tarballs contain a pre-generated copy -# of this file. - -version_version = '{version}' -version_full = '{version_full}' -""" - templatefun = r""" - -def get_versions(default={}, verbose=False): - return {'version': version_version, 'full': version_full} -""" - subst_template = template.format( + subst_template = self.template.format( version=VERSION_SHORT, - version_full=VERSION_FULL) + templatefun + version_full=VERSION_REVISION) + self.templatefun with open(versioneer.versionfile_source, 'w') as f: f.write(subst_template) |