]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
localedata: Rename to locale-data 246/head
authorLasse Schuirmann <lasse.schuirmann@gmail.com>
Tue, 22 Sep 2015 21:46:08 +0000 (23:46 +0200)
committerLasse Schuirmann <lasse.schuirmann@gmail.com>
Fri, 25 Sep 2015 19:18:39 +0000 (21:18 +0200)
To fix the ImportError because of the name clash with localedata.py.
locale-data is no valid python identifier and thus a nice indicator that
this directory actually contains data.

MANIFEST.in
Makefile
babel/locale-data/.gitignore [moved from babel/localedata/.gitignore with 100% similarity]
babel/localedata.py
scripts/import_cldr.py
setup.py
tests/test_core.py

index a53a51f14ade6b4388b7c5d6176741c85e2ab728..6c1e7aff442ceb70d810dcd3e809180006d3b80e 100644 (file)
@@ -1,7 +1,7 @@
 include Makefile CHANGES LICENSE AUTHORS
 include conftest.py tox.ini
 include babel/global.dat
-include babel/localedata/*.dat
+include babel/locale-data/*.dat
 recursive-include docs *
 recursive-exclude docs/_build *
 include scripts/*
index 12dbb5eb331566d0461c3b807f471a741111b0be..74b9a673d1d3f8525022cfd5fff82c782a09be4d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@ import-cldr:
        @python scripts/download_import_cldr.py
 
 clean-cldr:
-       @rm -f babel/localedata/*.dat
+       @rm -f babel/locale-data/*.dat
        @rm -f babel/global.dat
 
 clean-pyc:
index 1d3af9bf832e2c6ad6db7cd1be4f755e48197f25..79b4d8639866a592abc9bcd8b81fef7b675469ad 100644 (file)
@@ -21,7 +21,7 @@ from babel._compat import pickle
 
 _cache = {}
 _cache_lock = threading.RLock()
-_dirname = os.path.join(os.path.dirname(__file__), 'localedata')
+_dirname = os.path.join(os.path.dirname(__file__), 'locale-data')
 
 
 def exists(name):
index 789924c200a0bca4df7f7ba11a5e2781777ed960..85132c7e18471a5ea3a2897f4aa025713887ea11 100755 (executable)
@@ -271,7 +271,7 @@ def main():
             continue
 
         full_filename = os.path.join(srcdir, 'main', filename)
-        data_filename = os.path.join(destdir, 'localedata', stem + '.dat')
+        data_filename = os.path.join(destdir, 'locale-data', stem + '.dat')
 
         data = {}
         if not need_conversion(data_filename, data, full_filename):
index ed46467a3e846294bfd47fb2e1037cdb0e6f8792..4b8db0270ab2662ee15bfeed63347a1d556078a0 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -62,7 +62,7 @@ setup(
         'Topic :: Software Development :: Libraries :: Python Modules',
     ],
     packages=['babel', 'babel.messages', 'babel.localtime'],
-    package_data={'babel': ['global.dat', 'localedata/*.dat']},
+    package_data={'babel': ['global.dat', 'locale-data/*.dat']},
     install_requires=[
         # This version identifier is currently necessary as
         # pytz otherwise does not install on pip 1.4 or
index a4253d806271350fc9b32cb05508ddff3b5c6962..a643b36a9fceaab2d27c1529e1b3c19407310ce3 100644 (file)
@@ -288,10 +288,10 @@ def test_compatible_classes_in_global_and_localedata():
             return Unpickler(f).load()
 
     load('babel/global.dat')
-    load('babel/localedata/root.dat')
-    load('babel/localedata/en.dat')
-    load('babel/localedata/en_US.dat')
-    load('babel/localedata/en_US_POSIX.dat')
-    load('babel/localedata/zh_Hans_CN.dat')
-    load('babel/localedata/zh_Hant_TW.dat')
-    load('babel/localedata/es_419.dat')
+    load('babel/locale-data/root.dat')
+    load('babel/locale-data/en.dat')
+    load('babel/locale-data/en_US.dat')
+    load('babel/locale-data/en_US_POSIX.dat')
+    load('babel/locale-data/zh_Hans_CN.dat')
+    load('babel/locale-data/zh_Hant_TW.dat')
+    load('babel/locale-data/es_419.dat')