diff --git a/scripts/pyinstaller/build.py b/scripts/pyinstaller/build.py index 9cef9ac3d..cdfd63e6a 100644 --- a/scripts/pyinstaller/build.py +++ b/scripts/pyinstaller/build.py @@ -1,6 +1,6 @@ import os import pathlib -from subprocess import STDOUT, check_call +from subprocess import STDOUT, check_call, check_output path = pathlib.Path(__file__).parent.absolute() hooks = path / "hooks" @@ -21,10 +21,27 @@ check_call( stderr=STDOUT, ) -check_call( +out = check_output( [ path / "dist" / "dvc" / "dvc", "doctor", ], stderr=STDOUT, -) +).decode() + +remotes = [ + "s3", + "oss", + "gdrive", + "gs", + "hdfs", + "http", + "webhdfs", + "azure", + "ssh", + "webdav", +] + +print(out) +for remote in remotes: + assert f"\t{remote}" in out, f"Missing support for {remote}" diff --git a/scripts/pyinstaller/hooks/hook-dvc.py b/scripts/pyinstaller/hooks/hook-dvc.py index 84fcb0f3c..bc8b3c3c2 100644 --- a/scripts/pyinstaller/hooks/hook-dvc.py +++ b/scripts/pyinstaller/hooks/hook-dvc.py @@ -16,5 +16,15 @@ datas += copy_metadata("webdav4") datas += copy_metadata("aiohttp") datas += copy_metadata("aiohttp_retry") -# https://github.com/pypa/setuptools/issues/1963 -hiddenimports = ["pkg_resources.py2_warn"] +hiddenimports = [ + "dvc_azure", + "dvc_gdrive", + "dvc_gs", + "dvc_hdfs", + "dvc_oss", + "dvc_s3", + "dvc_webdav", + "dvc_webhdfs", + # https://github.com/pypa/setuptools/issues/1963 + "pkg_resources.py2_warn", +]