Skip to content

Commit

Permalink
Update runtime hook for pymorphy2
Browse files Browse the repository at this point in the history
  • Loading branch information
BLKSerene committed Sep 2, 2019
1 parent fc9c2c9 commit 402e560
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion wordless_packaging.spec
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ hiddenimports = [

# Runtime hooks
runtime_hooks = [
'wordless_hook_pymorphy2.py'
'wordless_runtime_hook_pymorphy2.py'
]

# Exclusions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Wordless: Packaging Hook - pymorphy2
# Wordless: Runtime Hook - pymorphy2
#
# Copyright (C) 2018-2019 Ye Lei (叶磊)
#
Expand All @@ -14,15 +14,15 @@
# Reference: https://github.com/pyinstaller/pyinstaller/issues/3050
def iter_entry_points(group, name = None):
for entry_point in entry_points:
if entry_point.find(group) > -1:
entry_point_parsed = pkg_resources.EntryPoint.parse(entry_point)
entry_point_parsed.dist = pkg_resources.Distribution()
if entry_point.find(group) > -1:
entry_point_parsed = pkg_resources.EntryPoint.parse(entry_point)
entry_point_parsed.dist = pkg_resources.Distribution()

yield entry_point_parsed
yield entry_point_parsed

entry_points = [
'uk = pymorphy2_dicts_uk',
'ru = pymorphy2_dicts_ru'
'ru = pymorphy2_dicts_ru',
'uk = pymorphy2_dicts_uk'
]

pkg_resources.iter_entry_points = iter_entry_points

0 comments on commit 402e560

Please sign in to comment.