diff --git a/dvc/info.py b/dvc/info.py index e7c05f05e..677c5ebb2 100644 --- a/dvc/info.py +++ b/dvc/info.py @@ -4,6 +4,8 @@ import pathlib import platform import uuid +import psutil + from dvc.exceptions import DvcException, NotDvcRepoError from dvc.repo import Repo from dvc.scm.base import SCMError @@ -13,11 +15,6 @@ from dvc.utils import error_link from dvc.utils.pkg import PKG from dvc.version import __version__ -try: - import psutil -except ImportError: - psutil = None - if PKG is None: package = "" else: @@ -44,9 +41,8 @@ def get_dvc_info(): info.append( "Cache types: {}".format(_get_linktype_support_info(repo)) ) - if psutil: - fs_type = get_fs_type(repo.cache.local.cache_dir) - info.append(f"Cache directory: {fs_type}") + fs_type = get_fs_type(repo.cache.local.cache_dir) + info.append(f"Cache directory: {fs_type}") else: info.append("Cache types: " + error_link("no-dvc-cache")) @@ -60,9 +56,8 @@ def get_dvc_info(): info.append("Repo: dvc, git (broken)") else: root_directory = repo.root_dir - if psutil: - fs_root = get_fs_type(os.path.abspath(root_directory)) - info.append(f"Workspace directory: {fs_root}") + fs_root = get_fs_type(os.path.abspath(root_directory)) + info.append(f"Workspace directory: {fs_root}") info.append("Repo: {}".format(_get_dvc_repo_info(repo))) return "\n".join(info) diff --git a/scripts/build-requirements.txt b/scripts/build-requirements.txt index 215483d10..0c2fb74f8 100644 --- a/scripts/build-requirements.txt +++ b/scripts/build-requirements.txt @@ -1,3 +1,2 @@ PyInstaller==3.5 numpy==1.19.3 -psutil diff --git a/setup.py b/setup.py index 45045046d..d8343b4be 100644 --- a/setup.py +++ b/setup.py @@ -73,6 +73,7 @@ install_requires = [ "win-unicode-console>=0.5; sys_platform == 'win32'", "pywin32>=225; sys_platform == 'win32'", "networkx>=2.1", + "psutil>=5.8.0", "pydot>=1.2.4", "speedcopy>=2.0.1; python_version < '3.8' and sys_platform == 'win32'", "dataclasses==0.7; python_version < '3.7'",