Skip to content

Commit

Permalink
feat(prog): initial support for pyvenv (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jan 7, 2024
1 parent f79dfe7 commit 8a34f24
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions modules/me-prog.el
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,19 @@
"cqC" #'quickrun-compile-only-select
"cqd" #'quickrun-select-default))

(use-package pyvenv
:straight t
:config
(defun +pyenv--use-pyvenv-interpreter-h ()
(when pyvenv-virtual-env
(put 'python-shell-interpreter 'previous-value python-shell-interpreter)
(setq python-shell-interpreter (concat pyvenv-virtual-env "python3"))))
(defun +pyenv--restore-interpreter-h ()
(setq python-shell-interpreter (or (get 'python-shell-interpreter 'previous-value) (+standard-value 'python-shell-interpreter))))
:custom
(pyvenv-post-activate-hooks (list #'+pyenv--use-pyvenv-interpreter-h))
(pyvenv-post-deactivate-hooks (list #'+pyenv--restore-interpreter-h)))

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

Expand Down

0 comments on commit 8a34f24

Please sign in to comment.