refactor(python): remove local conda.el fix

These were upstreamed.

Ref: necaris/conda.el@3c6d3c2022
Revert: 8f60a1bc46
Amend: b126c3857d
This commit is contained in:
Henrik Lissner
2025-04-08 18:08:03 -04:00
parent b7f4d31218
commit a39a5c24af

View File

@ -206,40 +206,7 @@
(use-package! conda
:when (modulep! +conda)
:after python
:preface
;; HACK: `conda-anaconda-home's initialization can throw an error if none of
;; `conda-home-candidates' exist, so unset it early.
;; REVIEW: Fix this upstream.
(setq conda-anaconda-home (getenv "ANACONDA_HOME")
conda-home-candidates
(list "~/.anaconda"
"~/.anaconda3"
"~/.miniconda"
"~/.miniconda3"
"~/.miniforge3"
"~/anaconda3"
"~/miniconda3"
"~/miniforge3"
"~/opt/miniconda3"
"/usr/bin/anaconda3"
"/usr/local/anaconda3"
"/usr/local/miniconda3"
"/usr/local/Caskroom/miniconda/base"
"~/.conda"))
:config
;; The location of your anaconda home will be guessed from a list of common
;; possibilities, starting with `conda-anaconda-home''s default value (which
;; will consult a ANACONDA_HOME envvar, if it exists).
;;
;; If none of these work for you, `conda-anaconda-home' must be set
;; explicitly. Afterwards, run M-x `conda-env-activate' to switch between
;; environments
(or (cl-loop for dir in (cons conda-anaconda-home conda-home-candidates)
if (and dir (file-directory-p dir))
return (setq conda-anaconda-home (expand-file-name dir)
conda-env-home-directory (expand-file-name dir)))
(message "Cannot find Anaconda installation"))
;; integration with term/eshell
(conda-env-initialize-interactive-shells)
(after! eshell (conda-env-initialize-eshell))