From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id BF5821384C0 for ; Sat, 29 Aug 2015 16:11:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3D7F114252; Sat, 29 Aug 2015 16:11:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E191414252 for ; Sat, 29 Aug 2015 16:11:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 98A5634089F for ; Sat, 29 Aug 2015 16:11:11 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 63F29144 for ; Sat, 29 Aug 2015 16:11:06 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1440864636.83d1bd1a2b01e3b89caca3ff48e4308176c208f0.dolsen@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/version.py X-VCS-Directories: catalyst/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 83d1bd1a2b01e3b89caca3ff48e4308176c208f0 X-VCS-Branch: master Date: Sat, 29 Aug 2015 16:11:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d41e8c81-485e-4f1b-9a6c-55b5870e98d2 X-Archives-Hash: 74b17521813243f9d5402ef85665786f commit: 83d1bd1a2b01e3b89caca3ff48e4308176c208f0 Author: Brian Dolbec gentoo org> AuthorDate: Sat Aug 29 16:10:36 2015 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Sat Aug 29 16:10:36 2015 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=83d1bd1a version.py: Copy what was needed of the old format_version code to fix versioning The new get_version code from snakeoil is not compatible with teh rest of the catlyst code. It will need a lot more conversion to use the new system. I do think it could be better once completed. catalyst/version.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/catalyst/version.py b/catalyst/version.py index 8c0b267..c274a11 100644 --- a/catalyst/version.py +++ b/catalyst/version.py @@ -10,16 +10,28 @@ import os -from snakeoil.version import get_version as get_ver +from snakeoil.version import get_git_version as get_ver -__version__="rewrite-git" +__version__="git" _ver = None def get_git_version(version=__version__): """Return: a string describing our version.""" global _ver - _ver = get_ver('catalyst-%s' % version, __file__) + cwd = os.path.dirname(os.path.abspath(__file__)) + version_info = get_ver(cwd) + + if not version_info: + s = "extended version info unavailable" + elif version_info['tag'] == api_version: + s = 'released %s' % (version_info['date'],) + else: + s = ('vcs version %s, date %s' % + (version_info['rev'], version_info['date'])) + + _ver = '%s %s\n%s' % (project, api_version, s) + return _ver