Skip to content

Commit b96c15f

Browse files
committed
Use pythonic package for actiavte/deactivate environments.
1 parent 15a3b93 commit b96c15f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pyenv-mode.el

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
;; Author: Artem Malyshev <[email protected]>
66
;; URL: https://github.com/proofit404/pyenv-mode
7-
;; Version: 0.0.3
7+
;; Version: 0.1.0
8+
;; Package-Requires: ((pythonic "0.1.0"))
89

910
;; This program is free software; you can redistribute it and/or modify
1011
;; it under the terms of the GNU General Public License as published by
@@ -25,7 +26,7 @@
2526

2627
;;; Code:
2728

28-
(require 'python)
29+
(require 'pythonic)
2930

3031
(defgroup pyenv-mode nil
3132
"Pyenv virtualenv integration with python mode."
@@ -64,15 +65,15 @@
6465
(defun pyenv-mode-set (version)
6566
"Set python shell VERSION."
6667
(interactive (list (pyenv-mode-read-version)))
67-
(setq python-shell-virtualenv-path (pyenv-mode-full-path version))
68+
(pythonic-activate (pyenv-mode-full-path version))
6869
(setenv "PYENV_VERSION" version)
6970
(force-mode-line-update))
7071

7172
;;;###autoload
7273
(defun pyenv-mode-unset ()
7374
"Unset python shell version."
7475
(interactive)
75-
(setq python-shell-virtualenv-path nil)
76+
(pythonic-deactivate)
7677
(setenv "PYENV_VERSION")
7778
(force-mode-line-update))
7879

0 commit comments

Comments
 (0)