Source: nbsphinx
Version: 0.2.14+ds-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], we noticed
that nbsphinx could not be built reproducibly.
Patch attached that uses different Javascript to get the sibling
element instead of generating a (random) UUID and putting
that in the DOM.
[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.0
+0100
--- b/debian/patches/reproducible-build.patch 2017-11-07 16:41:02.718541350
+
@@ -0,0 +1,22 @@
+Description: Make the build reproducible
+Author: Chris Lamb
+Last-Update: 2017-11-07
+
+--- nbsphinx-0.2.14+ds.orig/nbsphinx.py
nbsphinx-0.2.14+ds/nbsphinx.py
+@@ -150,13 +150,12 @@ RST_TEMPLATE = """
+
+ {{ output.data['text/html'] | indent | indent }}
+ {%- elif datatype == 'application/javascript' %}
+-{% set div_id = uuid4() %}
+
+ .. raw:: html
+
+-
++
+
+-var element = document.getElementById('{{ div_id }}');
++var element = document.currentScript.previousSibling.previousSibling;
+ {{ output.data['application/javascript'] | indent | indent }}
+
+ {%- elif datatype.startswith('application') and datatype.endswith('+json') %}
--- a/debian/patches/series 2017-11-07 16:08:32.862051001 +
--- b/debian/patches/series 2017-11-07 16:40:20.470183875 +
@@ -1 +1,2 @@
debianization-documentation.patch
+reproducible-build.patch
___
Python-modules-team mailing list
Python-modules-team@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team