Source: mpl-sphinx-theme Version: 0.0.6-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0] we noticed that mpl-sphinx-theme could not be built reproducibly. This is because the documentation embedded the current build year. A patch is attached that optionally uses SOURCE_DATE_EPOCH [1] as the source of this value instead. [0] https://reproducible-builds.org/ [1] https://reproducible-builds.org/specs/source-date-epoch/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/reproducible-build.patch 1969-12-31 16:00:00.000000000 -0800 --- b/debian/patches/reproducible-build.patch 2022-02-15 09:31:32.750091395 -0800 @@ -0,0 +1,27 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2022-02-15 + +--- mpl-sphinx-theme-0.0.6.orig/docs/conf.py ++++ mpl-sphinx-theme-0.0.6/docs/conf.py +@@ -1,5 +1,11 @@ ++import os ++import time + import datetime + ++build_date = datetime.datetime.utcfromtimestamp( ++ int(os.environ.get('SOURCE_DATE_EPOCH', time.time())) ++) ++ + # Configuration file for the Sphinx documentation builder for + # matplotlib projects. + +@@ -10,7 +16,7 @@ is_release_build = tags.has('release') + + project = "Matplotlib Sphinx Theme" + copyright = ( +- f"2012 - {datetime.datetime.now().year} The Matplotlib development team" ++ f"2012 - {build_date.year} The Matplotlib development team" + ) + author = "Matplotlib Developers" + --- a/debian/patches/series 1969-12-31 16:00:00.000000000 -0800 --- b/debian/patches/series 2022-02-15 09:31:31.994091267 -0800 @@ -0,0 +1 @@ +reproducible-build.patch