Skip to content

Commit

Permalink
add PyInstaller support (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sllambias authored Nov 29, 2024
1 parent 1db5cf7 commit 57cd3b3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "yucca"
version = "2.2.2"
version = "2.2.3"
authors = [
{ name="Sebastian Llambias", email="[email protected]" },
{ name="Asbjørn Munk", email="[email protected]" },
Expand Down Expand Up @@ -62,6 +62,9 @@ yucca_ensemble = 'yucca.pipeline.run.run_ensemble:main'
"Homepage" = "https://github.com/sllambias/yucca"
"Bug Tracker" = "https://github.com/sllambias/yucca/issues"

[project.entry-points.pyinstaller40]
hook-dirs = 'yucca:_pyinstaller_hooks_dir'

[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
Expand Down
7 changes: 7 additions & 0 deletions yucca/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import logging

logging.getLogger().setLevel(logging.INFO)


# Tell PyInstaller where to find hook-yucca.py
def _pyinstaller_hooks_dir():
from pathlib import Path

return [str(Path(__file__).with_name("_pyinstaller").resolve())]
Empty file added yucca/_pyinstaller/__init__.py
Empty file.
4 changes: 4 additions & 0 deletions yucca/_pyinstaller/hook-yucca.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from PyInstaller.utils.hooks import collect_data_files


datas = collect_data_files("yucca", include_py_files=True)
3 changes: 0 additions & 3 deletions yucca/modules/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
import logging

logging.getLogger().setLevel(logging.INFO)

0 comments on commit 57cd3b3

Please sign in to comment.