refactor is_conda placement

This commit is contained in:
n3hrox
2019-11-04 21:29:56 +01:00
parent b97865e165
commit 83429a5abc
+3 -7
View File
@@ -13,9 +13,6 @@ def is_conda():
def get_linux():
import distro
if is_conda():
return "conda"
if not is_binary():
return "pip"
@@ -33,8 +30,6 @@ def get_linux():
def get_darwin():
if is_conda():
return "conda"
if not is_binary():
if __file__.startswith("/usr/local/Cellar"):
return "formula"
@@ -44,8 +39,6 @@ def get_darwin():
def get_windows():
if is_conda():
return "conda"
return None if is_binary() else "pip"
@@ -53,6 +46,9 @@ def get_package_manager():
import platform
from dvc.exceptions import DvcException
if is_conda():
return "conda"
m = {
"Windows": get_windows(),
"Darwin": get_darwin(),