Skip to content

Commit

Permalink
tweak(prog): obsolete pyenv and pyvenv (to be replaced with pet)
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed May 16, 2024
1 parent a20a23e commit 650b10c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 16 deletions.
16 changes: 0 additions & 16 deletions modules/me-prog.el
Original file line number Diff line number Diff line change
Expand Up @@ -275,22 +275,6 @@ Fall back to the default `citre--project-root'."
"cqC" #'quickrun-compile-only-select
"cqd" #'quickrun-select-default))

(use-package pyvenv
:straight t)

(use-package pyenv
:straight (:host github :repo "aiguofer/pyenv.el")
:hook (minemacs-first-python-file . +global-pyenv-mode-maybe)
:custom
(pyenv-show-active-python-in-modeline nil)
:config
(defun +global-pyenv-mode-maybe (&optional arg)
"Enable `pyenv-global-mode' if it can be enabled."
(interactive (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) 'toggle)))
(if (file-executable-p pyenv-executable)
(global-pyenv-mode arg)
(+log! "The %S file doesn't exist or is not executable, `pyenv' cannot be enabled." pyenv-executable))))

(use-package gitlab-ci-mode
:straight t)

Expand Down
30 changes: 30 additions & 0 deletions modules/obsolete/me-pyenv.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
;;; me-pyenv.el --- Python environment integration (replaced with `pet') -*- lexical-binding: t; -*-

;; Copyright (C) 2022-2024 Abdelhak Bougouffa

;; Author: Abdelhak Bougouffa (rot13 "nobhtbhssn@srqbencebwrpg.bet")

;;; Commentary:

;;; Code:

(use-package pyvenv
:straight t)

(use-package pyenv
:straight (:host github :repo "aiguofer/pyenv.el")
:hook (minemacs-first-python-file . +global-pyenv-mode-maybe)
:custom
(pyenv-show-active-python-in-modeline nil)
:config
(defun +global-pyenv-mode-maybe (&optional arg)
"Enable `pyenv-global-mode' if it can be enabled."
(interactive (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) 'toggle)))
(if (file-executable-p pyenv-executable)
(global-pyenv-mode arg)
(+log! "The %S file doesn't exist or is not executable, `pyenv' cannot be enabled." pyenv-executable))))


(provide 'obsolete/me-pyenv)

;;; me-pyenv.el ends here

0 comments on commit 650b10c

Please sign in to comment.