[pytango] 43/122: Adapt Release.version_long to PEP 440 standard

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:18:16 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to tag v9.2.1
in repository pytango.

commit 1152fc149429d5346789cfd3ff61dd5675ec462c
Author: Vincent Michel <vincent.michel at maxlab.lu.se>
Date:   Fri Sep 30 14:44:36 2016 +0200

    Adapt Release.version_long to PEP 440 standard
---
 tango/release.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tango/release.py b/tango/release.py
index 85efa3f..370eb5c 100644
--- a/tango/release.py
+++ b/tango/release.py
@@ -27,6 +27,8 @@ class Release:
           of the version number: major, minor, micro, releaselevel, and
         serial.
         - version: (str) package version in format <major>.<minor>.<micro>
+        - release: (str) pre-release, post-release or development release;
+          it is empty for final releases.
         - version_long: (str) package version in format
           <major>.<minor>.<micro><releaselevel><serial>
         - version_description: (str) short description for the current
@@ -45,7 +47,10 @@ class Release:
     name = 'PyTango'
     version_info = (9, 2, 0)
     version = '.'.join(map(str, version_info[:3]))
-    version_long = version + ''.join(map(str, version_info[3:]))
+    release = ''.join(map(str, version_info[3:]))
+    separator = '.' if 'dev' in release or 'post' in release else ''
+    version_long = version + separator + release
+
     version_description = 'This version implements the C++ Tango 9.2 API.'
     version_number = int(version.replace('.', ''))
     description = 'A python binding for the Tango control system'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list