Browse Source

Added hook-lark.py and the required lines in setup.py

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.8.6
MegaIng1 5 years ago
parent
commit
20834d89d9
3 changed files with 25 additions and 1 deletions
  1. +6
    -0
      lark/__pyinstaller/__init__.py
  2. +14
    -0
      lark/__pyinstaller/hook-lark.py
  3. +5
    -1
      setup.py

+ 6
- 0
lark/__pyinstaller/__init__.py View File

@@ -0,0 +1,6 @@
# For usage of lark with PyInstaller. See https://pyinstaller-sample-hook.readthedocs.io/en/latest/index.html

import os

def get_hook_dirs():
return [os.path.dirname(__file__)]

+ 14
- 0
lark/__pyinstaller/hook-lark.py View File

@@ -0,0 +1,14 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2017-2020, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#
# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
#-----------------------------------------------------------------------------

from PyInstaller.utils.hooks import collect_data_files

datas = collect_data_files('lark')

+ 5
- 1
setup.py View File

@@ -57,6 +57,10 @@ Main Features:
"Topic :: Text Processing :: Linguistic",
"License :: OSI Approved :: MIT License",
],

entry_points = {
'pyinstaller40': [
'hook-dirs = lark.__pyinstaller:get_hook_dirs'
]
},
)


Loading…
Cancel
Save