[Python-modules-commits] r31662 - in packages/gamera/trunk/debian (3 files)
danstender-guest at users.alioth.debian.org
danstender-guest at users.alioth.debian.org
Tue Jan 13 20:45:12 UTC 2015
Date: Tuesday, January 13, 2015 @ 20:45:11
Author: danstender-guest
Revision: 31662
fixed for reproducible building
Added:
packages/gamera/trunk/debian/patches/constant-seed-for-docs.diff
Modified:
packages/gamera/trunk/debian/changelog
packages/gamera/trunk/debian/patches/series
Modified: packages/gamera/trunk/debian/changelog
===================================================================
--- packages/gamera/trunk/debian/changelog 2015-01-13 14:08:43 UTC (rev 31661)
+++ packages/gamera/trunk/debian/changelog 2015-01-13 20:45:11 UTC (rev 31662)
@@ -1,3 +1,11 @@
+gamera (3.4.1+svn1423-5) UNRELEASED; urgency=medium
+
+ * Added constant-seed-for-docs.diff to make build reproducible
+ by using constant seed for generation of example/documentation
+ images (Closes: #775228).
+
+ -- Daniel Stender <debian at danielstender.com> Tue, 13 Jan 2015 21:23:11 +0100
+
gamera (3.4.1+svn1423-4) unstable; urgency=medium
* Upload to unstable.
Added: packages/gamera/trunk/debian/patches/constant-seed-for-docs.diff
===================================================================
--- packages/gamera/trunk/debian/patches/constant-seed-for-docs.diff (rev 0)
+++ packages/gamera/trunk/debian/patches/constant-seed-for-docs.diff 2015-01-13 20:45:11 UTC (rev 31662)
@@ -0,0 +1,87 @@
+Description: use constant seed for example images
+ Importing random will seed the prng with the current system time,
+ which will produce different example images on every build.
+ To make the build reproducible, use a constant seed value.
+Bug: https://bugs.debian.org/775228
+Forwarded: no
+Author: Reiner Herrmann <reiner at reiner-h.de>
+
+--- a/gamera/plugins/draw.py
++++ b/gamera/plugins/draw.py
+@@ -61,8 +61,9 @@ class draw_marker(PluginFunction):
+ author = "Michael Droettboom"
+
+ def __doc_example1__(images):
+- from random import randint
++ from random import randint, seed
+ from gamera.core import Image, Dim
++ seed(0)
+ image = Image((0, 0), Dim(100, 100), RGB, DENSE)
+ points = [(randint(0, 100), randint(0, 100)) for x in range(4)]
+ image.draw_bezier(*tuple(list(points) + [RGBPixel(255, 0, 0), 0.1]))
+@@ -106,8 +107,9 @@ class draw_line(PluginFunction):
+ __call__ = staticmethod(__call__)
+
+ def __doc_example1__(images):
+- from random import randint
++ from random import randint, seed
+ from gamera.core import Image, Dim
++ seed(0)
+ image = Image((0, 0), Dim(100, 100), RGB, DENSE)
+ for i in range(10):
+ image.draw_line((randint(0, 100), randint(0, 100)),
+@@ -160,8 +162,9 @@ class draw_hollow_rect(PluginFunction):
+ __call__ = staticmethod(__call__)
+
+ def __doc_example1__(images):
+- from random import randint
++ from random import randint, seed
+ from gamera.core import Image, Dim
++ seed(0)
+ image = Image((0, 0), Dim(100, 100), RGB, DENSE)
+ for i in range(10):
+ image.draw_hollow_rect((randint(0, 100), randint(0, 100)),
+@@ -199,8 +202,9 @@ class draw_filled_rect(PluginFunction):
+ __call__ = staticmethod(__call__)
+
+ def __doc_example1__(images):
+- from random import randint
++ from random import randint, seed
+ from gamera.core import Image, Dim
++ seed(0)
+ image = Image((0, 0), Dim(100, 100), RGB, DENSE)
+ for i in range(10):
+ image.draw_filled_rect((randint(0, 100), randint(0, 100)),
+@@ -244,8 +248,9 @@ class draw_bezier(PluginFunction):
+ __call__ = staticmethod(__call__)
+
+ def __doc_example1__(images):
+- from random import randint
++ from random import randint, seed
+ from gamera.core import Image, Dim
++ seed(0)
+ image = Image((0, 0), Dim(100, 100), RGB, DENSE)
+ for i in range(10):
+ image.draw_bezier((randint(0, 100), randint(0, 100)),
+@@ -292,8 +297,9 @@ class draw_circle(PluginFunction):
+ __call__ = staticmethod(__call__)
+
+ def __doc_example1__(images):
+- from random import randint
++ from random import randint, seed
+ from gamera.core import Image, Dim
++ seed(0)
+ image = Image((0, 0), Dim(100, 100), RGB, DENSE)
+ for i in range(10):
+ image.draw_circle((randint(0, 100), randint(0, 100)),
+@@ -447,8 +453,9 @@ class draw_text(PluginFunction):
+ __call__ = staticmethod(__call__)
+
+ def __doc_example1__(images):
+- from random import randint
++ from random import randint, seed
+ from gamera.core import Image, Dim
++ seed(0)
+ image = Image((0, 0), Dim(320, 300), RGB, DENSE)
+
+ # These are some various Unicode encoded names of different
Modified: packages/gamera/trunk/debian/patches/series
===================================================================
--- packages/gamera/trunk/debian/patches/series 2015-01-13 14:08:43 UTC (rev 31661)
+++ packages/gamera/trunk/debian/patches/series 2015-01-13 20:45:11 UTC (rev 31662)
@@ -11,3 +11,4 @@
fix-typos.diff
avoid_mktemp.diff
gendoc-version-parsing.diff
+constant-seed-for-docs.diff
More information about the Python-modules-commits
mailing list