summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Schuirmann <lasse.schuirmann@gmail.com>2015-09-22 23:46:08 +0200
committerLasse Schuirmann <lasse.schuirmann@gmail.com>2015-09-25 21:18:39 +0200
commit2d1882edeef621f3bacbfa6af2d7b5a5d34a81f1 (patch)
tree15f945398a70a57a08b0de302ec926f013025b42
parentd4a1a20de73069ba305820a4cbf934d684d505ca (diff)
downloadbabel-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.in2
-rw-r--r--Makefile2
-rw-r--r--babel/locale-data/.gitignore (renamed from babel/localedata/.gitignore)0
-rw-r--r--babel/localedata.py2
-rwxr-xr-xscripts/import_cldr.py2
-rwxr-xr-xsetup.py2
-rw-r--r--tests/test_core.py14
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/*
diff --git a/Makefile b/Makefile
index 12dbb5e..74b9a67 100644
--- 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:
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):
diff --git a/setup.py b/setup.py
index ed46467..4b8db02 100755
--- 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
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')