Source: pytest Version: 8.3.1-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 pytest could not be built reproducibly. This is because some tool is appending the current date to the changelog.html file within the generated documentation: -<section id="pytest-release-unreleased-draft-2024-07-26"> -<h3>pytest 8.3 [UNRELEASED DRAFT] (2024-07-26)<a class="headerlink" href="#pytest-release-unreleased-draft-2024-07-26" title="Link to this heading">¶</a></h3> +<section id="pytest-release-unreleased-draft-2025-08-29"> +<h3>pytest 8.3 [UNRELEASED DRAFT] (2025-08-29)<a class="headerlink" href="#pytest-release-unreleased-draft-2025-08-29" title="Link to this heading">¶</a></h3> <p>No significant changes.</p> It's not entirely clear which tool is adding this. tag_date=0 is set in setup.cfg, and I don't immediately see how the sphinxcontrib-towncrier might be embedding the date either. Either way, if we force is_release in the Sphinx conf.py, then this section simply disappears. A patch is attached for this. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/0003-Reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/0003-Reproducible-build.patch 2024-07-29 10:59:41.409019028 +0100 @@ -0,0 +1,15 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2024-07-29 + +--- pytest-8.3.1.orig/doc/en/conf.py ++++ pytest-8.3.1/doc/en/conf.py +@@ -254,7 +254,7 @@ issues_github_path = "pytest-dev/pytest" + # https://docs.readthedocs.io/en/stable/reference/environment-variables.html#environment-variable-reference + # https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#including-content-based-on-tags + +-IS_RELEASE_ON_RTD = ( ++IS_RELEASE_ON_RTD = True or ( + os.getenv("READTHEDOCS", "False") == "True" + and os.environ["READTHEDOCS_VERSION_TYPE"] == "tag" + ) --- a/debian/patches/series 2024-07-29 10:04:04.548711137 +0100 --- b/debian/patches/series 2024-07-29 10:53:17.464500624 +0100 @@ -1,2 +1,3 @@ 0001-Use-local-intersphinx-mappings.patch 0002-Disable-Sphinx-extensions.patch +0003-Reproducible-build.patch