File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,24 @@ def append_pair_path_windows(): # type (None) -> None
50
50
append_pair_path (apertium_lang_path )
51
51
52
52
53
+ def update_path_windows ():
54
+ '''Adding the Apertium Binaries to Process' PATH'''
55
+
56
+ if platform .system () == 'Windows' :
57
+ install_path = os .environ ['LOCALAPPDATA' ]
58
+ current = os .environ ['path' ]
59
+
60
+ apertium_path = os .path .join (install_path , 'apertium-all-dev' , 'bin' )
61
+ if os .path .isdir (apertium_path ):
62
+ update_path = '{};{};' .format (current , apertium_path )
63
+ os .environ ['path' ] = update_path
64
+
65
+
53
66
pair_paths = ['/usr/share/apertium' , '/usr/local/share/apertium' ]
54
67
analyzers = {} # type: Dict[str, Tuple[str, str]]
55
68
generators = {} # type: Dict[str, Tuple[str, str]]
56
69
pairs = {} # type: Dict[str, str]
57
70
for pair_path in pair_paths :
58
71
_update_modes (pair_path )
59
72
append_pair_path_windows ()
73
+ update_path_windows ()
You can’t perform that action at this time.
0 commit comments