Source: python-babel
Version: 1.3+dfsg.1-5
Severity: wishlist
Tags: patch
Usertags: timestamps locale


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

The attached patch makes build timestamp independent from the timezone
and remove the name of the build system locale from the documentation.
It also fixes the documentation, which claims the default value of some
function parameters are <the build system locale>, whereas it is the
locale of the user running python-babel.

Once applied, python-babel can be built reproducibly in our current
experimental framework.


diff -ru python-babel-1.3+dfsg.1.old/debian/rules python-babel-1.3+dfsg.1/debian/rules
--- python-babel-1.3+dfsg.1.old/debian/rules	2015-08-17 16:11:42.085139669 +0000
+++ python-babel-1.3+dfsg.1/debian/rules	2015-08-18 14:08:43.901039679 +0000
@@ -1,5 +1,8 @@
 #!/usr/bin/make -f
+export LC_TIME=C
+export LANGUAGE=C
 PYTHONS:=$(shell pyversions -vr)
 PYTHON3S:=$(shell py3versions -vr)
@@ -57,6 +60,7 @@
 	sphinx-build docs docs/_build
 	dh_installdocs -O--buildsystem=python_distutils
 	mkdir -p debian/python-babel-doc/usr/share/doc/python-babel-doc/html
+	sed -i "s/locale='en_US_POSIX'/locale=[system locale]/g" docs/_build/*/*.html
 	cp -auxf docs/_build/* debian/python-babel-doc/usr/share/doc/python-babel-doc/html

Attachment: signature.asc
Description: OpenPGP digital signature

Reproducible-builds mailing list

Reply via email to