[fix] local dirs for cldr data

This commit is contained in:
Al
2015-04-14 15:46:15 -04:00
parent 744231c148
commit 6e9295154a
4 changed files with 15 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ from collections import Counter
from cStringIO import StringIO from cStringIO import StringIO
from lxml import etree from lxml import etree
from geodata.i18n.unicode_data import CLDR_DIR from unicode_paths import CLDR_DIR
this_dir = os.path.realpath(os.path.dirname(__file__)) this_dir = os.path.realpath(os.path.dirname(__file__))
DEFAULT_LANGUAGES_DIR = os.path.join(os.pardir, os.pardir, os.pardir, DEFAULT_LANGUAGES_DIR = os.path.join(os.pardir, os.pardir, os.pardir,

View File

@@ -4,7 +4,7 @@ import subprocess
import sys import sys
import tempfile import tempfile
from cldr_data import CLDR_DIR from unicode_paths import CLDR_DIR
this_dir = os.path.realpath(os.path.dirname(__file__)) this_dir = os.path.realpath(os.path.dirname(__file__))
sys.path.append(os.path.realpath(os.path.join(os.pardir, os.pardir))) sys.path.append(os.path.realpath(os.path.join(os.pardir, os.pardir)))

View File

@@ -0,0 +1,10 @@
import os
import sys
this_dir = os.path.realpath(os.path.dirname(__file__))
sys.path.append(os.path.realpath(os.path.join(os.pardir, os.pardir)))
UNICODE_DATA_DIR = os.path.join(this_dir, os.pardir, os.pardir, os.pardir,
'data', 'unicode')
CLDR_DIR = os.path.join(UNICODE_DATA_DIR, 'cldr')

View File

@@ -30,9 +30,9 @@ sys.path.append(os.path.realpath(os.path.join(os.pardir, os.pardir)))
from geodata.encoding import safe_encode, safe_decode from geodata.encoding import safe_encode, safe_decode
from geodata.file_utils import ensure_dir from geodata.file_utils import ensure_dir
from geodata.i18n.cldr_languages import * from cldr_languages import *
from geodata.i18n.unicode_data import UNICODE_DATA_DIR from unicode_paths import UNICODE_DATA_DIR
from geodata.i18n.word_breaks import script_regex, regex_char_range from word_breaks import script_regex, regex_char_range
SCRIPTS_DATA_DIR = os.path.join(UNICODE_DATA_DIR, 'scripts') SCRIPTS_DATA_DIR = os.path.join(UNICODE_DATA_DIR, 'scripts')
LOCAL_SCRIPTS_FILE = os.path.join(SCRIPTS_DATA_DIR, 'Scripts.txt') LOCAL_SCRIPTS_FILE = os.path.join(SCRIPTS_DATA_DIR, 'Scripts.txt')