Source: python-dtcwt
Version: 0.10.1+dfsg1-1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: randomness
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi,

While working on the "reproducible builds" effort [1], we have noticed
that python-dtcwt could not be built reproducibly.

The attached patch removes randomness from the documentation by setting
a deterministic random seed before starting.

 [1]: https://wiki.debian.org/ReproducibleBuilds


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
diff --no-dereference -urNad 
python-dtcwt.orig/python-dtcwt-0.10.1+dfsg1/debian/patches/reproducible-build.patch
 python-dtcwt/python-dtcwt-0.10.1+dfsg1/debian/patches/reproducible-build.patch
--- 
python-dtcwt.orig/python-dtcwt-0.10.1+dfsg1/debian/patches/reproducible-build.patch
 1970-01-01 01:00:00.000000000 +0100
+++ 
python-dtcwt/python-dtcwt-0.10.1+dfsg1/debian/patches/reproducible-build.patch  
    2015-07-29 18:37:58.726979444 +0100
@@ -0,0 +1,13 @@
+--- python-dtcwt-0.10.1+dfsg1.orig/docs/conf.py
++++ python-dtcwt-0.10.1+dfsg1/docs/conf.py
+@@ -26,6 +26,10 @@ project = setup_cfg.get('metadata', 'nam
+ import dtcwt
+ version = release = dtcwt.__version__
+ 
++# Ensure a deterministic build by setting the random seed
++import numpy
++numpy.random.seed(0)
++
+ # If extensions (or modules to document with autodoc) are in another 
directory,
+ # add these directories to sys.path here. If the directory is relative to the
+ # documentation root, use os.path.abspath to make it absolute, like shown 
here.
diff --no-dereference -urNad 
python-dtcwt.orig/python-dtcwt-0.10.1+dfsg1/debian/patches/series 
python-dtcwt/python-dtcwt-0.10.1+dfsg1/debian/patches/series
--- python-dtcwt.orig/python-dtcwt-0.10.1+dfsg1/debian/patches/series   
2015-07-29 18:25:46.906458366 +0100
+++ python-dtcwt/python-dtcwt-0.10.1+dfsg1/debian/patches/series        
2015-07-29 18:37:55.946856120 +0100
@@ -1 +1,2 @@
 use-system-mathjax.patch
+reproducible-build.patch
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to