void-packages/srcpkgs/uberwriter/patches/uberwriter-localesdb.patch
2015-07-31 14:46:43 +02:00

37 lines
1.7 KiB
Diff

diff -up uberwriter_bugfixes/setup.py.orig uberwriter_bugfixes/setup.py
--- uberwriter_bugfixes/setup.py.orig 2012-12-10 23:22:28.168386230 -0600
+++ uberwriter_bugfixes/setup.py 2012-12-10 23:24:50.598256044 -0600
@@ -159,7 +159,4 @@ DistUtilsExtra.auto.setup(
"uberwriter_lib",
"uberwriter"
],
- package_data={
- 'pylocales' : ['locales.db']
- }
)
\ No newline at end of file
diff -up uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py.orig uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py
--- uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py.orig 2012-12-10 23:25:11.512379118 -0600
+++ uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py 2012-12-10 23:26:03.519678793 -0600
@@ -38,20 +38,8 @@ __all__ = ['Country', 'Language', 'Langu
_translator_language = gettext.translation('iso_639', fallback=True).gettext
_translator_country = gettext.translation('iso_3166', fallback=True).gettext
-# Decides where the database is located. If an application provides an
-# os.path.get_module_path monkey patch to determine the path where the module
-# is located it uses this. If not it searches in the directory of this source
-# code file.
-__path__ = None
-if hasattr(os.path, 'get_module_path'):
- __path__ = os.path.get_module_path(__file__)
- if not os.path.isfile(os.path.join(__path__, 'locales.db')):
- __path__ = None
-if __path__ is None:
- __path__ = os.path.abspath(os.path.realpath(os.path.dirname(__file__)))
-
# Loading the Database
-_database = sqlite3.connect(os.path.join(__path__, 'locales.db'))
+_database = sqlite3.connect('/usr/share/uberwriter/locales.db')
logger = logging.getLogger(__name__)