66# that just contains the computed version number.
77
88# This file is released into the public domain. Generated by
9- # versioneer-0.18 (https://github.com/warner /python-versioneer)
9+ # versioneer-0.19 (https://github.com/python-versioneer /python-versioneer)
1010
1111"""Git implementation of _version.py."""
1212
@@ -42,8 +42,8 @@ def get_config():
4242 cfg .VCS = "git"
4343 cfg .style = "pep440"
4444 cfg .tag_prefix = "v"
45- cfg .parentdir_prefix = "versioneercheck -"
46- cfg .versionfile_source = "versioneercheck /_version.py"
45+ cfg .parentdir_prefix = "pulsequantum -"
46+ cfg .versionfile_source = "pulsequantum /_version.py"
4747 cfg .verbose = False
4848 return cfg
4949
@@ -57,7 +57,7 @@ class NotThisMethod(Exception):
5757
5858
5959def register_vcs_handler (vcs , method ): # decorator
60- """Decorator to mark a method as the handler for a particular VCS."""
60+ """Create decorator to mark a method as the handler of a VCS."""
6161 def decorate (f ):
6262 """Store f in HANDLERS[vcs][method]."""
6363 if vcs not in HANDLERS :
@@ -93,9 +93,7 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False,
9393 if verbose :
9494 print ("unable to find command, tried %s" % (commands ,))
9595 return None , None
96- stdout = p .communicate ()[0 ].strip ()
97- if sys .version_info [0 ] >= 3 :
98- stdout = stdout .decode ()
96+ stdout = p .communicate ()[0 ].strip ().decode ()
9997 if p .returncode != 0 :
10098 if verbose :
10199 print ("unable to run %s (error)" % dispcmd )
@@ -165,6 +163,10 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose):
165163 raise NotThisMethod ("no keywords at all, weird" )
166164 date = keywords .get ("date" )
167165 if date is not None :
166+ # Use only the last line. Previous lines may contain GPG signature
167+ # information.
168+ date = date .splitlines ()[- 1 ]
169+
168170 # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant
169171 # datestamp. However we prefer "%ci" (which expands to an "ISO-8601
170172 # -like" string, which we must then edit to make compliant), because
@@ -300,6 +302,9 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
300302 # commit date: see ISO-8601 comment in git_versions_from_keywords()
301303 date = run_command (GITS , ["show" , "-s" , "--format=%ci" , "HEAD" ],
302304 cwd = root )[0 ].strip ()
305+ # Use only the last line. Previous lines may contain GPG signature
306+ # information.
307+ date = date .splitlines ()[- 1 ]
303308 pieces ["date" ] = date .strip ().replace (" " , "T" , 1 ).replace (" " , "" , 1 )
304309
305310 return pieces
@@ -338,18 +343,18 @@ def render_pep440(pieces):
338343
339344
340345def render_pep440_pre (pieces ):
341- """TAG[.post .devDISTANCE] -- No -dirty.
346+ """TAG[.post0 .devDISTANCE] -- No -dirty.
342347
343348 Exceptions:
344- 1: no tags. 0.post .devDISTANCE
349+ 1: no tags. 0.post0 .devDISTANCE
345350 """
346351 if pieces ["closest-tag" ]:
347352 rendered = pieces ["closest-tag" ]
348353 if pieces ["distance" ]:
349- rendered += ".post .dev%d" % pieces ["distance" ]
354+ rendered += ".post0 .dev%d" % pieces ["distance" ]
350355 else :
351356 # exception #1
352- rendered = "0.post .dev%d" % pieces ["distance" ]
357+ rendered = "0.post0 .dev%d" % pieces ["distance" ]
353358 return rendered
354359
355360
@@ -385,7 +390,7 @@ def render_pep440_old(pieces):
385390
386391 The ".dev0" means dirty.
387392
388- Eexceptions :
393+ Exceptions :
389394 1: no tags. 0.postDISTANCE[.dev0]
390395 """
391396 if pieces ["closest-tag" ]:
0 commit comments