Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Improve how we detect if we are running under Anaconda #6090

Merged
merged 2 commits into from
Dec 30, 2017
Merged
Changes from 1 commit
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
10 changes: 5 additions & 5 deletions spyder/config/utils.py
Original file line number Diff line number Diff line change
@@ -157,7 +157,7 @@ def get_edit_extensions():
# Detection of OS specific versions
#==============================================================================
def is_ubuntu():
"Detect if we are running in an Ubuntu-based distribution"
"""Detect if we are running in an Ubuntu-based distribution"""
if sys.platform.startswith('linux') and osp.isfile('/etc/lsb-release'):
release_info = open('/etc/lsb-release').read()
if 'Ubuntu' in release_info:
@@ -169,7 +169,7 @@ def is_ubuntu():


def is_gtk_desktop():
"Detect if we are running in a Gtk-based desktop"
"""Detect if we are running in a Gtk-based desktop"""
if sys.platform.startswith('linux'):
xdg_desktop = os.environ.get('XDG_CURRENT_DESKTOP', '')
if xdg_desktop:
@@ -185,7 +185,7 @@ def is_gtk_desktop():


def is_kde_desktop():
"Detect if we are running in a KDE desktop"
"""Detect if we are running in a KDE desktop"""
if sys.platform.startswith('linux'):
xdg_desktop = os.environ.get('XDG_CURRENT_DESKTOP', '')
if xdg_desktop:
@@ -200,10 +200,10 @@ def is_kde_desktop():


def is_anaconda():
"
"""
Detect if we are running under Anaconda.
Taken from https://stackoverflow.com/a/47610844/438386
"
"""
is_conda = osp.exists(osp.join(sys.prefix, 'conda-meta'))
return is_conda