Source: python-oslo.reports
Version: 1.30.0-2
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: randomness
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] I noticed that
python-oslo.reports could not be built reproducibly.

This was because the documentation (somewhat-uselessly) generated
documentation for the tests themselves, which revealed some MagicMock
special objects that had had a Python string representation containing
a nondetermistic number.

For example:

  -<code class="descname">MM_FILE</code><em class="property"> = &lt;MagicMock 
name='file_obj' id='139866970863568'&gt;</em>
  +<code class="descname">MM_FILE</code><em class="property"> = &lt;MagicMock 
name='file_obj' id='140338508670736'&gt;</em>

Patch attached that simply skips the API documentation for the tests
from being generated in the first place.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/debian/patches/reproducible-build.patch   1970-01-01 01:00:00.000000000 
+0100
--- b/debian/patches/reproducible-build.patch   2020-02-08 15:28:58.005976410 
+0000
@@ -0,0 +1,11 @@
+Description: Make the build reproducible
+Author: Chris Lamb <la...@debian.org>
+Last-Update: 2020-02-08
+
+--- python-oslo.reports-1.30.0.orig/doc/source/conf.py
++++ python-oslo.reports-1.30.0/doc/source/conf.py
+@@ -92,3 +92,4 @@ latex_documents = [
+ # -- sphinxcontrib.apidoc configuration --------------------------------------
+ apidoc_module_dir = '../../oslo_reports'
+ apidoc_output_dir = 'reference/api'
++apidoc_excluded_paths = ['tests']
--- a/debian/patches/series     1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/series     2020-02-08 15:28:57.149990690 +0000
@@ -0,0 +1 @@
+reproducible-build.patch

Reply via email to