Set the origin date once and forget it.
This commit is contained in:
parent
ee0d8647d8
commit
e690b031cc
|
@ -4,6 +4,7 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import datetime
|
||||||
|
|
||||||
if 'check_output' not in dir(subprocess):
|
if 'check_output' not in dir(subprocess):
|
||||||
import subprocess32 as subprocess
|
import subprocess32 as subprocess
|
||||||
|
@ -22,7 +23,10 @@ dist_info_cmd = [sys.executable, setup_script] + fields
|
||||||
output_bytes = subprocess.check_output(dist_info_cmd, cwd=root)
|
output_bytes = subprocess.check_output(dist_info_cmd, cwd=root)
|
||||||
project, version, url, author = output_bytes.decode('utf-8').strip().split('\n')
|
project, version, url, author = output_bytes.decode('utf-8').strip().split('\n')
|
||||||
|
|
||||||
copyright = '2016 ' + author
|
origin_date = datetime.date(2017,1,1)
|
||||||
|
today = datetime.date.today()
|
||||||
|
|
||||||
|
copyright = '{origin_date.year}-{today.year} {author}'.format(**locals())
|
||||||
|
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = version
|
release = version
|
||||||
|
|
Loading…
Reference in New Issue
Block a user