[Python-modules-commits] r25925 - in packages/python-babel/trunk/debian (5 files)

wrar-guest at users.alioth.debian.org wrar-guest at users.alioth.debian.org
Mon Sep 23 17:40:08 UTC 2013


    Date: Monday, September 23, 2013 @ 17:40:06
  Author: wrar-guest
Revision: 25925

Run build-time tests.

Added:
  packages/python-babel/trunk/debian/patches/c.utf-8.patch
Modified:
  packages/python-babel/trunk/debian/control
  packages/python-babel/trunk/debian/patches/series
  packages/python-babel/trunk/debian/rules
Deleted:
  packages/python-babel/trunk/debian/patches/localedata.patch

Modified: packages/python-babel/trunk/debian/control
===================================================================
--- packages/python-babel/trunk/debian/control	2013-09-23 17:21:45 UTC (rev 25924)
+++ packages/python-babel/trunk/debian/control	2013-09-23 17:40:06 UTC (rev 25925)
@@ -4,7 +4,8 @@
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Christoph Haas <haas at debian.org>, Andrey Rahmatullin <wrar at wrar.name>
 Build-Depends: debhelper (>= 8), dh-python, python-sphinx | python3-sphinx,
- python-all (>= 2.6.6-3), python3-all, python-setuptools, python3-setuptools, python-tz
+ python-all (>= 2.6.6-3), python3-all, python-setuptools, python3-setuptools, python-tz,
+ python3-tz, python-pytest, python3-pytest
 Standards-Version: 3.9.4
 Homepage: http://babel.pocoo.org/
 Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/python-babel/trunk/

Added: packages/python-babel/trunk/debian/patches/c.utf-8.patch
===================================================================
--- packages/python-babel/trunk/debian/patches/c.utf-8.patch	                        (rev 0)
+++ packages/python-babel/trunk/debian/patches/c.utf-8.patch	2013-09-23 17:40:06 UTC (rev 25925)
@@ -0,0 +1,16 @@
+Description: Handle C.UTF-8 locale like C locale in default_locale()
+Author: Andrey Rahmatullin <wrar at wrar.name>
+Bug: https://github.com/mitsuhiko/babel/issues/57
+Last-Update: 2013-09-21
+
+--- python-babel-1.3.orig/babel/core.py	2013-07-29 03:15:48.000000000 +0600
++++ python-babel-1.3/babel/core.py	2013-09-21 02:06:23.547103108 +0600
+@@ -775,7 +775,7 @@
+                 # the LANGUAGE variable may contain a colon-separated list of
+                 # language codes; we just pick the language on the list
+                 locale = locale.split(':')[0]
+-            if locale in ('C', 'POSIX'):
++            if locale in ('C', 'C.UTF-8', 'POSIX'):
+                 locale = 'en_US_POSIX'
+             elif aliases and locale in aliases:
+                 locale = aliases[locale]

Deleted: packages/python-babel/trunk/debian/patches/localedata.patch
===================================================================
--- packages/python-babel/trunk/debian/patches/localedata.patch	2013-09-23 17:21:45 UTC (rev 25924)
+++ packages/python-babel/trunk/debian/patches/localedata.patch	2013-09-23 17:40:06 UTC (rev 25925)
@@ -1,18 +0,0 @@
-Description: Search for locale data in /usr/share/python-babel-localedata
- This allows splitting locale data into a common package which can be used
- both by Python 2 and Python 3 modules.
-Author: Andrey Rahmatullin <wrar at wrar.name>
-Forwarded: not-needed
-Last-Update: 2013-08-28
-
---- a/babel/localedata.py
-+++ b/babel/localedata.py
-@@ -21,7 +21,7 @@
- 
- _cache = {}
- _cache_lock = threading.RLock()
--_dirname = os.path.join(os.path.dirname(__file__), 'localedata')
-+_dirname = '/usr/share/python-babel-localedata'
- 
- 
- def exists(name):

Modified: packages/python-babel/trunk/debian/patches/series
===================================================================
--- packages/python-babel/trunk/debian/patches/series	2013-09-23 17:21:45 UTC (rev 25924)
+++ packages/python-babel/trunk/debian/patches/series	2013-09-23 17:40:06 UTC (rev 25925)
@@ -1 +1 @@
-localedata.patch
+c.utf-8.patch

Modified: packages/python-babel/trunk/debian/rules
===================================================================
--- packages/python-babel/trunk/debian/rules	2013-09-23 17:21:45 UTC (rev 25924)
+++ packages/python-babel/trunk/debian/rules	2013-09-23 17:40:06 UTC (rev 25925)
@@ -2,6 +2,8 @@
 
 export PYBUILD_DESTDIR_python2=debian/python-babel/
 export PYBUILD_DESTDIR_python3=debian/python3-babel/
+export PYBUILD_TEST_PYTEST=1
+export PYBUILD_TEST_ARGS=$(CURDIR)/tests
 
 %:
 	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
@@ -13,12 +15,17 @@
 override_dh_auto_clean:
 	dh_auto_clean
 	make -C docs clean
+	rm tests/messages/data/project/i18n/en_US/LC_MESSAGES/messages.po
+	rm tests/messages/data/project/i18n/temp.pot
 
 override_dh_auto_install:
 	dh_auto_install
 	rm -rf debian/python-babel/usr/lib/python*/dist-packages/babel/localedata
 	rm -rf debian/python3-babel/usr/lib/python*/dist-packages/babel/localedata
 	mv debian/python3-babel/usr/bin/pybabel debian/python3-babel/usr/bin/pybabel3
+	sed -i -e "s,^_dirname = os\.path\.join.*,_dirname = '/usr/share/python-babel-localedata'," \
+	    debian/python-babel/usr/lib/python*/dist-packages/babel/localedata.py \
+	    debian/python3-babel/usr/lib/python*/dist-packages/babel/localedata.py
 
 override_dh_compress:
 	dh_compress -X *.html




More information about the Python-modules-commits mailing list