https://github.com/tkf/emacs-python-environment
Python virtualenv API for Emacs Lisp
https://github.com/tkf/emacs-python-environment
Last synced: 9 months ago
JSON representation
Python virtualenv API for Emacs Lisp
- Host: GitHub
- URL: https://github.com/tkf/emacs-python-environment
- Owner: tkf
- Created: 2013-06-21T18:53:43.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-03-10T08:54:03.000Z (almost 11 years ago)
- Last Synced: 2025-03-27T20:19:57.541Z (10 months ago)
- Language: Emacs Lisp
- Size: 313 KB
- Stars: 60
- Watchers: 7
- Forks: 13
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
======================================
Python virtualenv API for Emacs Lisp
======================================
.. sidebar:: Links:
* `Repository
`_ (at GitHub)
* `Issue tracker
`_ (at GitHub)
* `Travis CI
`_ |build-status|
* `MELPA
`_ |melpa-badge|
* `MELPA Stable
`_ |melpa-stable-badge|
Emacs integrates well with external tools written in languages other
than Emacs Lisp and thus use of these tools should be encouraged.
However, many people try to avoid using non-Emacs Lisp software tools
since it makes installation of their Emacs plugin hard.
python-environment.el solves this problem (only for the case the tool
is written in Python) by providing virtualenv API in Emacs Lisp so
that you can automate installation of tools written in Python.
Let's say you write Emacs plugin which uses Python script. Then you
would want to setup Python modules for that script easily from Emacs.
This is how to do that using python-environment.el
.. code :: cl
(require 'python-environment)
(defun YOUR-PLUGIN-install-python-dependencies ()
(interactive)
(python-environment-run "pip" "install" "epc"))
In your plugin, if you want the path to command installed in the
virtualenv, do something like this
.. code :: cl
(start-process NAME BUFFER
(python-environment-bin "COMMAND")
...)
Path to access COMMAND may be different in \*nix and in Windows, but
python-environment.el finds the right path.
.. Build status badge
.. |build-status|
image:: https://secure.travis-ci.org/tkf/emacs-python-environment.png
?branch=master
:target: http://travis-ci.org/tkf/emacs-python-environment
:alt: Build Status
.. |melpa-badge|
image:: http://melpa.org/packages/python-environment-badge.svg
:target: http://melpa.org/#/python-environment
:alt: MELPA Badge
.. |melpa-stable-badge|
image:: http://stable.melpa.org/packages/python-environment-badge.svg
:target: http://stable.melpa.org/#/python-environment
:alt: MELPA Stable Badge