Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions aio_pika/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
__version__ = Distribution.from_name("aio-pika").version


def _py_installer_hook() -> list[str]:
from pathlib import Path

return [str(Path(__file__).resolve().parent)]


__all__ = (
"AMQPException",
"Channel",
Expand Down
4 changes: 4 additions & 0 deletions aio_pika/hook-aio_pika.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from PyInstaller.utils.hooks import copy_metadata


datas = copy_metadata("aio-pika")
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ dependencies = [
"yarl",
]

[project.entry-points.pyinstaller40]
hook-dirs = "aio_pika:_py_installer_hook"

[project.urls]
Homepage = "https://github.com/mosquito/aio-pika"
Source = "https://github.com/mosquito/aio-pika"
Expand Down Expand Up @@ -108,6 +111,10 @@ files = [
"docs/source/rabbitmq-tutorial/examples/6-rpc",
]

[[tool.mypy.overrides]]
module = ["PyInstaller.*"]
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = ["tests.*"]
check_untyped_defs = true
Expand Down
Loading