Skip to content

Commit

Permalink
Package name updated (#78)
Browse files Browse the repository at this point in the history
* updated package name

python3-apertium -> python3-apertium-core

* increase logging level to ERROR

* bump version to 0.2.3
  • Loading branch information
singh-lokendra authored and sushain97 committed Nov 2, 2019
1 parent 74f6a32 commit 15b0d4a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions apertium/__init__.py
@@ -1,6 +1,6 @@
__author__ = 'Lokendra Singh, Arghya Bhatttacharya, Sushain K. Cherivirala, Andi Qu'
__license__ = 'GNU General Public License v3.0'
__version__ = '0.2.2'
__version__ = '0.2.3'

import logging
import os
Expand Down Expand Up @@ -85,5 +85,5 @@ def windows_update_path() -> None:
_update_modes(pair_path)
if platform.system() == 'Windows':
windows_update_path()
logging.basicConfig(format='[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s', level=logging.WARNING)
logging.basicConfig(format='[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s', level=logging.ERROR)
logger = logging.getLogger()
4 changes: 2 additions & 2 deletions apertium/installer.py
Expand Up @@ -119,8 +119,8 @@ def _download_package(package: str) -> None:
@staticmethod
def _rename_wrappers() -> None:
wrapper_name = {
'python3-apertium': '_apertium_core',
'python3-apertium-lex-tools': '_lextools',
'python3-apertium-core': '_apertium_core',
'python3-apertium-lex-tools': '_apertium_lex_tools',
'python3-cg3': '_constraint_grammar',
'python3-lttoolbox': '_lttoolbox',
}
Expand Down
8 changes: 4 additions & 4 deletions apertium/utils.py
Expand Up @@ -10,7 +10,7 @@
sys.path.append('/usr/lib/python3/dist-packages')

import apertium_core
import lextools
import apertium_lex_tools
import lttoolbox
import constraint_grammar
wrappers_available = True
Expand Down Expand Up @@ -38,7 +38,7 @@ def __init__(self, dictionary_path: str, arg: str) -> None:
else:
self.initAnalysis()

class LRX(lextools.LRXProc): # type: ignore
class LRX(apertium_lex_tools.LRXProc): # type: ignore
def __init__(self, dictionary_path: str) -> None:
super().__init__(dictionary_path)
self.init()
Expand Down Expand Up @@ -83,7 +83,7 @@ def handle_command_with_wrapper(command: Union[List[str], Tuple[str, ...]], end:
initialized_wrappers[command] = fst
elif 'lrx-proc' == command[0]:
dictionary_path = command[-1]
lextools.LtLocale.tryToSetLocale()
apertium_lex_tools.LtLocale.tryToSetLocale()
lrx = LRX(dictionary_path) # type: LRX
initialized_wrappers[command] = lrx
elif 'apertium-transfer' == command[0]:
Expand Down Expand Up @@ -112,7 +112,7 @@ def handle_command_with_wrapper(command: Union[List[str], Tuple[str, ...]], end:
lt_proc_command, dictionary_path, arg = command[:-1], command[-1], command[1]
fst.lt_proc(lt_proc_command, input_file.name, output_file.name)
elif 'lrx-proc' == command[0]:
lextools.LtLocale.tryToSetLocale()
apertium_lex_tools.LtLocale.tryToSetLocale()
lrx = initialized_wrappers[command]
lrx.lrx_proc(command, input_file.name, output_file.name)
elif 'apertium-transfer' == command[0]:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -16,7 +16,7 @@ def install_binaries() -> None:
apertium.installer.install_module('eng')
apertium.installer.install_module('en-es')
apertium.installer.install_module('kaz-tat')
apertium.installer.install_wrapper('python3-apertium')
apertium.installer.install_wrapper('python3-apertium-core')
apertium.installer.install_wrapper('python3-apertium-lex-tools')
apertium.installer.install_wrapper('python3-cg3')
apertium.installer.install_wrapper('python3-lttoolbox')
Expand Down

0 comments on commit 15b0d4a

Please sign in to comment.