diff --git a/emacs/init.org b/emacs/init.org index 14326ba..47fa6d0 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -4643,6 +4643,25 @@ Some functions to make my day job easier. (leader-def-key "Lr" #'release-manager) #+END_SRC +** Python stuff +Run pip install in the current project: +#+BEGIN_SRC emacs-lisp + (defun pip-install (reqs) + (interactive + (list + (read-file-name "Requirements file: " + (or (projectile-project-root) + default-directory) + nil t "requirements" + (lambda (name) + (string-match-p "requirements.*" + name))))) + (with-temp-buffer + (cd (or (projectile-project-root) + default-directory)) + (compile (format "pip install -r %s" reqs)))) +#+END_SRC + ** AWS-MFA The aws-mfa command: #+BEGIN_SRC emacs-lisp