summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2022-10-03 23:40:38 +0200
committerTobias Klauser <tklauser@distanz.ch>2022-10-03 23:40:38 +0200
commit6d90dd35def47f4236d55373741f065ce453b20e (patch)
treedab849d6e7d3f0f345d0944fad9676c9d2b1baae
parent919d0050d0caeb513134c69538b0f39dd521b3bb (diff)
Move pyenv and conda initialization to zshrc
-rw-r--r--.zsh/zprofile/80_pyenv14
-rw-r--r--.zsh/zshenv/80_python5
-rw-r--r--.zsh/zshrc/80_python30
3 files changed, 30 insertions, 19 deletions
diff --git a/.zsh/zprofile/80_pyenv b/.zsh/zprofile/80_pyenv
deleted file mode 100644
index da505d0..0000000
--- a/.zsh/zprofile/80_pyenv
+++ /dev/null
@@ -1,14 +0,0 @@
-# zprofile/80_pyenv
-#
-# Set variables related to pyenv
-#
-# Copyright © 2021 Tobias Klauser <tklauser@distanz.ch>
-# Released under the terms of the Artistic Licence 2.0
-#
-# Source repository: git://git.distanz.ch/dotfiles/zsh.git
-
-if command -v pyenv 1>/dev/null 2>&1; then
- eval "$(pyenv init --path)"
-fi
-
-# vim:ft=zsh
diff --git a/.zsh/zshenv/80_python b/.zsh/zshenv/80_python
index 994a3ab..4a18e9a 100644
--- a/.zsh/zshenv/80_python
+++ b/.zsh/zshenv/80_python
@@ -12,9 +12,4 @@
export PYTHONSTARTUP=$HOME/.pythonrc
-# see https://opensource.com/article/19/5/python-3-default-mac
-if command -v pyenv 1>/dev/null 2>&1; then
- eval "$(pyenv init -)"
-fi
-
# vim:ft=zsh
diff --git a/.zsh/zshrc/80_python b/.zsh/zshrc/80_python
new file mode 100644
index 0000000..6357b52
--- /dev/null
+++ b/.zsh/zshrc/80_python
@@ -0,0 +1,30 @@
+# zshenv/80_python
+#
+# Set up tools related to Python
+#
+# Copyright © 2014-2022 Tobias Klauser <tklauser@distanz.ch>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: git://git.distanz.ch/dotfiles/zsh.git
+
+# see https://opensource.com/article/19/5/python-3-default-mac
+if command -v pyenv 1>/dev/null 2>&1; then
+ eval "$(pyenv init -)"
+fi
+
+# >>> conda initialize >>>
+# !! Contents within this block are managed by 'conda init' !!
+__conda_setup="$('/opt/homebrew/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
+if [ $? -eq 0 ]; then
+ eval "$__conda_setup"
+else
+ if [ -f "/opt/homebrew/anaconda3/etc/profile.d/conda.sh" ]; then
+ . "/opt/homebrew/anaconda3/etc/profile.d/conda.sh"
+ else
+ export PATH="/opt/homebrew/anaconda3/bin:$PATH"
+ fi
+fi
+unset __conda_setup
+# <<< conda initialize <<<
+
+# vim:ft=zsh