From 20834d89d95e5ab4acd3bc05fcd2cad67f61e95f Mon Sep 17 00:00:00 2001 From: MegaIng1 Date: Fri, 3 Apr 2020 10:57:47 +0200 Subject: [PATCH] Added hook-lark.py and the required lines in setup.py --- lark/__pyinstaller/__init__.py | 6 ++++++ lark/__pyinstaller/hook-lark.py | 14 ++++++++++++++ setup.py | 6 +++++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 lark/__pyinstaller/__init__.py create mode 100644 lark/__pyinstaller/hook-lark.py diff --git a/lark/__pyinstaller/__init__.py b/lark/__pyinstaller/__init__.py new file mode 100644 index 0000000..fa02fc9 --- /dev/null +++ b/lark/__pyinstaller/__init__.py @@ -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__)] \ No newline at end of file diff --git a/lark/__pyinstaller/hook-lark.py b/lark/__pyinstaller/hook-lark.py new file mode 100644 index 0000000..cf3d8e3 --- /dev/null +++ b/lark/__pyinstaller/hook-lark.py @@ -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') diff --git a/setup.py b/setup.py index 2a15ab1..cd66bd0 100644 --- a/setup.py +++ b/setup.py @@ -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' + ] + }, )