mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #7512 from mgeier/sphinx-version
Check for __display_version__ in package_dir
This commit is contained in:
commit
26e64c9d10
@ -56,6 +56,7 @@ if __version__.endswith('+'):
|
||||
__version__ = __version__[:-1] # remove '+' for PEP-440 version spec.
|
||||
try:
|
||||
ret = subprocess.run(['git', 'show', '-s', '--pretty=format:%h'],
|
||||
cwd=package_dir,
|
||||
stdout=PIPE, stderr=PIPE)
|
||||
if ret.stdout:
|
||||
__display_version__ += '/' + ret.stdout.decode('ascii').strip()
|
||||
|
Loading…
Reference in New Issue
Block a user