diff options
author | Lasse Schuirmann <lasse.schuirmann@gmail.com> | 2015-09-22 23:46:08 +0200 |
---|---|---|
committer | Lasse Schuirmann <lasse.schuirmann@gmail.com> | 2015-09-25 21:18:39 +0200 |
commit | 2d1882edeef621f3bacbfa6af2d7b5a5d34a81f1 (patch) | |
tree | 15f945398a70a57a08b0de302ec926f013025b42 | |
parent | d4a1a20de73069ba305820a4cbf934d684d505ca (diff) | |
download | babel-2d1882edeef621f3bacbfa6af2d7b5a5d34a81f1.tar.gz |
localedata: Rename to locale-datasils/wheel
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.
-rw-r--r-- | MANIFEST.in | 2 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | babel/locale-data/.gitignore (renamed from babel/localedata/.gitignore) | 0 | ||||
-rw-r--r-- | babel/localedata.py | 2 | ||||
-rwxr-xr-x | scripts/import_cldr.py | 2 | ||||
-rwxr-xr-x | setup.py | 2 | ||||
-rw-r--r-- | tests/test_core.py | 14 |
7 files changed, 12 insertions, 12 deletions
diff --git a/MANIFEST.in b/MANIFEST.in index a53a51f..6c1e7af 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -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/* @@ -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: diff --git a/babel/localedata/.gitignore b/babel/locale-data/.gitignore index 72e8ffc..72e8ffc 100644 --- a/babel/localedata/.gitignore +++ b/babel/locale-data/.gitignore diff --git a/babel/localedata.py b/babel/localedata.py index 1d3af9b..79b4d86 100644 --- a/babel/localedata.py +++ b/babel/localedata.py @@ -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): diff --git a/scripts/import_cldr.py b/scripts/import_cldr.py index 789924c..85132c7 100755 --- a/scripts/import_cldr.py +++ b/scripts/import_cldr.py @@ -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): @@ -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 diff --git a/tests/test_core.py b/tests/test_core.py index a4253d8..a643b36 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -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') |