[Python-modules-commits] r23992 - in packages/kitchen/trunk/debian (6 files)

laarmen-guest at users.alioth.debian.org laarmen-guest at users.alioth.debian.org
Tue Apr 23 14:25:23 UTC 2013


    Date: Tuesday, April 23, 2013 @ 14:25:21
  Author: laarmen-guest
Revision: 23992

Enable tests when building

Added:
  packages/kitchen/trunk/debian/patches/
  packages/kitchen/trunk/debian/patches/normalize_test_unicode_name
  packages/kitchen/trunk/debian/patches/series
Modified:
  packages/kitchen/trunk/debian/changelog
  packages/kitchen/trunk/debian/control
  packages/kitchen/trunk/debian/rules

Modified: packages/kitchen/trunk/debian/changelog
===================================================================
--- packages/kitchen/trunk/debian/changelog	2013-04-23 01:41:31 UTC (rev 23991)
+++ packages/kitchen/trunk/debian/changelog	2013-04-23 14:25:21 UTC (rev 23992)
@@ -1,5 +1,6 @@
 kitchen (1.1.1-1) UNRELEASED; urgency=low
 
   * Initial release. (Closes: #705930)
+  * Patch the test set to use consistent locale naming (forwarded)
 
  -- Simon Chopin <chopin.simon at gmail.com>  Mon, 22 Apr 2013 21:16:39 +0200

Modified: packages/kitchen/trunk/debian/control
===================================================================
--- packages/kitchen/trunk/debian/control	2013-04-23 01:41:31 UTC (rev 23991)
+++ packages/kitchen/trunk/debian/control	2013-04-23 14:25:21 UTC (rev 23992)
@@ -3,7 +3,13 @@
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Simon Chopin <chopin.simon at gmail.com>
-Build-Depends: debhelper (>= 8), python-all (>= 2.6.6-3~), python-setuptools
+Build-Depends:
+ debhelper (>= 8),
+ python-all (>= 2.6.6-3~),
+ libc-bin,
+ locales,
+ python-nose,
+ python-setuptools
 Standards-Version: 3.9.4
 X-Python-Version: >= 2.3
 Homepage: https://fedorahosted.org/kitchen/
@@ -20,5 +26,5 @@
  .
  A non-exhaustive list of the features provided by kitchen:
    * helpers for text and specifically unicode handling i18n support
-   * Compatibility layers from 2.3 'til 2.7.  A dictionary that treats unicode
-   * and str as different values
+   * Compatibility layers from 2.3 'til 2.7.
+   * A dictionary that treats unicode and str strings as different values

Added: packages/kitchen/trunk/debian/patches/normalize_test_unicode_name
===================================================================
--- packages/kitchen/trunk/debian/patches/normalize_test_unicode_name	                        (rev 0)
+++ packages/kitchen/trunk/debian/patches/normalize_test_unicode_name	2013-04-23 14:25:21 UTC (rev 23992)
@@ -0,0 +1,90 @@
+Description: Normalize the locale names when testing i18n features
+Author: Simon Chopin <chopin.simon at gmail.com>
+Bug: <URL to the upstream bug report if any, implies patch has been forwarded, optional>
+Applied-Upstream: <version|URL|commit, identifies patches merged upstream, optional>
+Last-Update: 2013-04-23
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/tests/test_i18n.py
++++ b/tests/test_i18n.py
+@@ -13,7 +13,7 @@
+ class TestI18N_UTF8(unittest.TestCase):
+     def setUp(self):
+         self.old_LC_ALL = os.environ.get('LC_ALL', None)
+-        os.environ['LC_ALL'] = 'pt_BR.UTF8'
++        os.environ['LC_ALL'] = 'pt_BR.UTF-8'
+ 
+     def tearDown(self):
+         if self.old_LC_ALL:
+@@ -331,7 +331,7 @@
+ class TestI18N_Latin1(unittest.TestCase):
+     def setUp(self):
+         self.old_LC_ALL = os.environ.get('LC_ALL', None)
+-        os.environ['LC_ALL'] = 'pt_BR.ISO8859-1'
++        os.environ['LC_ALL'] = 'pt_BR.ISO-8859-1'
+ 
+     def tearDown(self):
+         if self.old_LC_ALL:
+@@ -357,7 +357,7 @@
+ class TestNewGNUTranslationsNoMatch(TestDummyTranslations):
+     def setUp(self):
+         self.old_LC_ALL = os.environ.get('LC_ALL', None)
+-        os.environ['LC_ALL'] = 'pt_BR.utf8'
++        os.environ['LC_ALL'] = 'pt_BR.UTF-8'
+         self.translations = i18n.get_translation_object('test', ['%s/data/locale/' % os.path.dirname(__file__)])
+ 
+     def tearDown(self):
+@@ -370,7 +370,7 @@
+ class TestNewGNURealTranslations_UTF8(unittest.TestCase):
+     def setUp(self):
+         self.old_LC_ALL = os.environ.get('LC_ALL', None)
+-        os.environ['LC_ALL'] = 'pt_BR.UTF8'
++        os.environ['LC_ALL'] = 'pt_BR.UTF-8'
+         self.translations = i18n.get_translation_object('test', ['%s/data/locale/' % os.path.dirname(__file__)])
+ 
+     def tearDown(self):
+@@ -455,7 +455,7 @@
+ class TestNewGNURealTranslations_Latin1(TestNewGNURealTranslations_UTF8):
+     def setUp(self):
+         self.old_LC_ALL = os.environ.get('LC_ALL', None)
+-        os.environ['LC_ALL'] = 'pt_BR.ISO8859-1'
++        os.environ['LC_ALL'] = 'pt_BR.ISO-8859-1'
+         self.translations = i18n.get_translation_object('test', ['%s/data/locale/' % os.path.dirname(__file__)])
+ 
+     def tearDown(self):
+@@ -511,7 +511,7 @@
+ class TestFallbackNewGNURealTranslations_UTF8(unittest.TestCase):
+     def setUp(self):
+         self.old_LC_ALL = os.environ.get('LC_ALL', None)
+-        os.environ['LC_ALL'] = 'pt_BR.UTF8'
++        os.environ['LC_ALL'] = 'pt_BR.UTF-8'
+         self.translations = i18n.get_translation_object('test',
+                 ['%s/data/locale/' % os.path.dirname(__file__),
+                     '%s/data/locale-old' % os.path.dirname(__file__)])
+@@ -598,7 +598,7 @@
+ class TestFallbackNewGNURealTranslations_Latin1(unittest.TestCase):
+     def setUp(self):
+         self.old_LC_ALL = os.environ.get('LC_ALL', None)
+-        os.environ['LC_ALL'] = 'pt_BR.ISO8859-1'
++        os.environ['LC_ALL'] = 'pt_BR.ISO-8859-1'
+         self.translations = i18n.get_translation_object('test',
+                 ['%s/data/locale/' % os.path.dirname(__file__),
+                     '%s/data/locale-old' % os.path.dirname(__file__)])
+@@ -685,7 +685,7 @@
+ class TestFallback(unittest.TestCase):
+     def setUp(self):
+         self.old_LC_ALL = os.environ.get('LC_ALL', None)
+-        os.environ['LC_ALL'] = 'pt_BR.ISO8859-1'
++        os.environ['LC_ALL'] = 'pt_BR.ISO-8859-1'
+         self.gtranslations = i18n.get_translation_object('test',
+                 ['%s/data/locale/' % os.path.dirname(__file__),
+                     '%s/data/locale-old' % os.path.dirname(__file__)])
+@@ -721,7 +721,7 @@
+ class TestDefaultLocaleDir(unittest.TestCase):
+     def setUp(self):
+         self.old_LC_ALL = os.environ.get('LC_ALL', None)
+-        os.environ['LC_ALL'] = 'pt_BR.UTF8'
++        os.environ['LC_ALL'] = 'pt_BR.UTF-8'
+         self.old_DEFAULT_LOCALEDIRS = i18n._DEFAULT_LOCALEDIR
+         i18n._DEFAULT_LOCALEDIR = '%s/data/locale/' % os.path.dirname(__file__)
+         self.translations = i18n.get_translation_object('test')

Added: packages/kitchen/trunk/debian/patches/series
===================================================================
--- packages/kitchen/trunk/debian/patches/series	                        (rev 0)
+++ packages/kitchen/trunk/debian/patches/series	2013-04-23 14:25:21 UTC (rev 23992)
@@ -0,0 +1 @@
+normalize_test_unicode_name

Modified: packages/kitchen/trunk/debian/rules
===================================================================
--- packages/kitchen/trunk/debian/rules	2013-04-23 01:41:31 UTC (rev 23991)
+++ packages/kitchen/trunk/debian/rules	2013-04-23 14:25:21 UTC (rev 23992)
@@ -2,3 +2,20 @@
 
 %:
 	dh $@ --with python2
+
+override_dh_auto_test:
+ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
+	mkdir -p debian/tmp/locales
+	localedef -f UTF-8 -i en_US ./debian/tmp/locales/en_US.UTF-8/
+	localedef -f UTF-8 -i pt_BR ./debian/tmp/locales/pt_BR.UTF-8/
+	localedef -f ISO-8859-1 -i pt_BR ./debian/tmp/locales/pt_BR.ISO-8859-1/
+	set -e
+	echo $(shell pwd)
+	for py in $(shell pyversions -r); do \
+		LOCPATH=$(CURDIR)/debian/tmp/locales/ $$py /usr/bin/nosetests tests; \
+	done
+endif
+
+override_dh_auto_clean:
+	rm -rf @test* kitchen.egg-info
+	dh_auto_clean




More information about the Python-modules-commits mailing list