Skip to content

Commit 536273a

Browse files
authored
build: pyinstaller: use __pyinstaller (#9680)
1 parent 5cff489 commit 536273a

15 files changed

+20
-54
lines changed

dvc/__pyinstaller/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import os
2+
3+
4+
def get_hook_dirs():
5+
return [os.path.dirname(__file__)]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# ruff: noqa: N999
12
hiddenimports = ["win32timezone"]

scripts/pyinstaller/hooks/hook-celery.py renamed to dvc/__pyinstaller/hook-celery.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: N999
12
# pylint: disable=import-error
23
from PyInstaller.utils.hooks import collect_submodules, is_module_or_submodule
34

scripts/pyinstaller/hooks/hook-dvc.py renamed to dvc/__pyinstaller/hook-dvc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: N999
12
from PyInstaller.utils.hooks import copy_metadata # pylint:disable=import-error
23

34
# needed for `dvc doctor` to show dep versions

scripts/pyinstaller/hooks/hook-dvc.system.py renamed to dvc/__pyinstaller/hook-dvc.system.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: N999
12
import os
23

34
if os.name == "nt":

scripts/pyinstaller/hooks/hook-dvc.tree.gs.py renamed to dvc/__pyinstaller/hook-dvc.tree.gs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: N999
12
from PyInstaller.utils.hooks import copy_metadata # pylint:disable=import-error
23

34
datas = copy_metadata("google-cloud-storage")
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: N999
12
from PyInstaller.utils.hooks import copy_metadata # pylint:disable=import-error
23

34
datas = copy_metadata("flatten-dict")

scripts/pyinstaller/hooks/hook-dvc_task.py renamed to dvc/__pyinstaller/hook-dvc_task.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: N999
12
# pylint: disable=import-error
23
from PyInstaller.utils.hooks import collect_submodules
34

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# ruff: noqa: N999
12
hiddenimports = ["fsspec.implementations.memory"]

scripts/pyinstaller/hooks/hook-google_compute_engine.logger.py renamed to dvc/__pyinstaller/hook-google_compute_engine.logger.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: N999
12
from PyInstaller.utils.hooks import copy_metadata # pylint:disable=import-error
23

34
datas = copy_metadata("google-compute-engine")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: N999
12
from PyInstaller.utils.hooks import copy_metadata # pylint:disable=import-error
23

34
datas = copy_metadata("pydrive2")

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ lint = [
8282
"types-tabulate",
8383
"types-toml",
8484
"types-tqdm",
85+
"types-pyinstaller",
8586
]
8687
oss = ["dvc-oss==2.19"]
8788
s3 = ["dvc-s3==2.23.0"]
@@ -128,6 +129,10 @@ dvc = "dvc.api:DVCFileSystem"
128129
[project.entry-points."pytest11"]
129130
dvc-testing = "dvc.testing.plugin"
130131

132+
[project.entry-points."pyinstaller40"]
133+
hook-dirs = "dvc.__pyinstaller:get_hook_dirs"
134+
tests = "dvc.__pyinstaller:get_PyInstaller_tests"
135+
131136
[tool.setuptools]
132137
license-files = ["LICENSE"]
133138

scripts/build-requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

scripts/pyinstaller/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

scripts/pyinstaller/build.py

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)