[pytables] 17/20: Run tests with utf-8 locale

Antonio Valentino a_valentino-guest at moszumanska.debian.org
Fri Aug 14 19:00:08 UTC 2015


This is an automated email from the git hooks/post-receive script.

a_valentino-guest pushed a commit to branch master
in repository pytables.

commit cdf667a4dcdc5037f7f87ff2b059d36f99fd45d2
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date:   Fri Aug 14 16:00:20 2015 +0000

    Run tests with utf-8 locale
---
 debian/changelog |  1 +
 debian/control   |  1 +
 debian/rules     | 21 +++++++++++++++++----
 3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index ba48264..cd65f52 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,7 @@ pytables (3.2.1-1) UNRELEASED; urgency=medium
     - update vcs URLs to the new recommended format
     - remove deprecated XS-Testsuite field
     - general update and reformatting (suggested by cme fix dpkg-control)
+    - run tests with utf-8 locale (patch form Barry Warsaw <barry at ubuntu.com>)
   * debian/rules
     - make build reproducible
   * debian/patches
diff --git a/debian/control b/debian/control
index 5a0fc40..b67c32f 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,7 @@ Testsuite: autopkgtest
 Priority: optional
 Build-Depends: debhelper (>= 9.0.0),
                dh-python,
+               locales,
                libhdf5-dev,
                python-all-dev,
                python-all-dbg,
diff --git a/debian/rules b/debian/rules
index ff52809..7a660df 100755
--- a/debian/rules
+++ b/debian/rules
@@ -100,19 +100,32 @@ override_dh_install:
 	dh_numpy3
 	# using override_dh_auto_test causes problems for dbg versions
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+	# https://github.com/PyTables/PyTables/issues/485
+	mkdir -p $(CURDIR)/tmp-locales
+	localedef -i /usr/share/i18n/locales/en_US -c -f UTF-8 \
+		-A /usr/share/locale/locale.alias \
+		$(CURDIR)/tmp-locales/en_US.UTF-8
 	set -e -x; \
 	for py in $(PY2VERS); do \
 		cd $(CURDIR)/build/lib.*-$$py; \
-		env PYTHONPATH=. python$$py tables/tests/test_all.py -vvv; \
+		env PYTHONPATH=. \
+			LOCPATH=$(CURDIR)/tmp-locales LC_ALL=en_US.UTF-8 \
+			python$$py tables/tests/test_all.py -vvv; \
 		cd $(CURDIR)/debian/tmp/usr/lib/python$$py/dist-packages; \
-		env PYTHONPATH=. python$$py-dbg tables/tests/test_all.py -vvv; \
+		env PYTHONPATH=. \
+			LOCPATH=$(CURDIR)/tmp-locales LC_ALL=en_US.UTF-8 \
+			python$$py-dbg tables/tests/test_all.py -vvv; \
 	done
 	set -e -x; \
 	for py in $(PY3VERS); do \
 		cd $(CURDIR)/build/lib.*-$$py; \
-		env PYTHONPATH=. python$$py tables/tests/test_all.py -vvv; \
+		env PYTHONPATH=. \
+			LOCPATH=$(CURDIR)/tmp-locales LC_ALL=en_US.UTF-8 \
+			python$$py tables/tests/test_all.py -vvv; \
 		#cd $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages; \
-		#env PYTHONPATH=. python$$py-dbg tables/tests/test_all.py -vvv; \
+		#env PYTHONPATH=. \
+		#	LOCPATH=$(CURDIR)/tmp-locales LC_ALL=en_US.UTF-8 \
+		#	python$$py-dbg tables/tests/test_all.py -vvv; \
 	done
 endif
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytables.git



More information about the debian-science-commits mailing list