File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 2020import sphinx
2121
2222from datetime import datetime
23+ import time
24+
25+ # Parse year using SOURCE_DATE_EPOCH, falling back to current time.
26+ # https://reproducible-builds.org/specs/source-date-epoch/
27+ sourceyear = datetime .utcfromtimestamp (int (os .environ .get ('SOURCE_DATE_EPOCH' , time .time ()))).year
2328
2429# If your extensions are in another directory, add it here. If the directory
2530# is relative to the documentation root, use os.path.abspath to make it
@@ -212,7 +217,7 @@ def _check_dependencies():
212217project = 'Matplotlib'
213218copyright = ('2002 - 2012 John Hunter, Darren Dale, Eric Firing, '
214219 'Michael Droettboom and the Matplotlib development '
215- f'team; 2012 - { datetime . now (). year } The Matplotlib development team' )
220+ f'team; 2012 - { sourceyear } The Matplotlib development team' )
216221
217222
218223# The default replacements for |version| and |release|, also used in various
You can’t perform that action at this time.
0 commit comments