From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 32538@debbugs.gnu.org
Subject: [bug#32538] [PATCHv2] Add emacs-elpy
Date: Tue, 28 Aug 2018 09:06:12 -0400 [thread overview]
Message-ID: <87zhx6abej.fsf@apteryx.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <87sh304d56.fsf@apteryx.i-did-not-set--mail-host-address--so-tickle-me> (Maxim Cournoyer's message of "Mon, 27 Aug 2018 01:00:37 -0400")
[-- Attachment #1: Type: text/plain, Size: 657 bytes --]
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> Hello,
>
> This adds emacs-elpy to our collection, a worthy addition to Emacs when
> in need of editing some Python.
>
> To get the full experience, you'll want to install the following
> (optional) additions, like:
>
> guix package -i python-jedi python-autopep8 python-yapf python-black python-flake8
>
> You can enable Elpy by doing M-x elpy-mode in a Python buffer, and see
> which tools are installed using M-x elpy-config.
>
> Enjoy :)
>
> Maxim
This is a followup for the emacs-elpy package, where I added the info
and manpage documentation and fixed a couple small issues.
Thank you,
Maxim
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: v2 --]
[-- Type: text/x-patch, Size: 4032 bytes --]
From dcab7ba79e9a02dcb4bf68029d072c82a49c8ee0 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Mon, 12 Feb 2018 22:10:31 -0500
Subject: [PATCH] gnu: Add emacs-elpy.
* gnu/packages/emacs.scm (emacs-elpy): New variable.
---
gnu/packages/emacs.scm | 77 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 797e747fb..a1c245844 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -4525,6 +4525,83 @@ indentation (space indentation only).
@end enumerate")
(license license:gpl2+)))
+(define-public emacs-elpy
+ (package
+ (name "emacs-elpy")
+ (version "1.23.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jorgenschaefer/elpy.git")
+ (commit version)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0dy18lyvpgr8vi2a7r13i8bn6k3b12z4l8hx0y80sh3mnakvs14n"))))
+ (build-system emacs-build-system)
+ (arguments
+ `(#:include (cons* "^elpy/[^/]+\\.py$" "^snippets\\/" %default-include)
+ #:phases
+ ;; TODO: Make `elpy-config' display Guix commands :)
+ (modify-phases %standard-phases
+ ;; One elpy test depends on being run inside a Python virtual
+ ;; environment to pass. We have nothing to gain from doing so here,
+ ;; so we just trick Elpy into thinking we are (see:
+ ;; https://github.com/jorgenschaefer/elpy/pull/1293).
+ (add-before 'check 'fake-virtualenv
+ (lambda _
+ (setenv "VIRTUAL_ENV" "/tmp")
+ #t))
+ ;; TODO: Remove after next release (see:
+ ;; https://github.com/jorgenschaefer/elpy/pull/1293).
+ (add-after 'unpack 'fix-broken-test
+ (lambda _
+ (substitute* "test/elpy-config-test.el"
+ (("python-check-command") "elpy-syntax-check-command"))))
+ (add-before 'check 'build-doc
+ (lambda _
+ (with-directory-excursion "docs"
+ (invoke "make" "info" "man"))
+ ;; Move .info file at the root so that it can installed by the
+ ;; 'move-doc phase.
+ (rename-file "docs/_build/texinfo/Elpy.info" "Elpy.info")
+ #t))
+ (add-after 'build-doc 'install-manpage
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (man1 (string-append out "/share/man/man1")))
+ (mkdir-p man1)
+ (copy-file "docs/_build/man/elpy.1"
+ (string-append man1 "/elpy.1")))
+ #t)))
+ #:tests? #t
+ #:test-command '("ert-runner")))
+ (propagated-inputs
+ `(("emacs-company" ,emacs-company)
+ ("emacs-find-file-in-project" ,emacs-find-file-in-project)
+ ("emacs-highlight-indentation" ,emacs-highlight-indentation)
+ ("emacs-yasnippet" ,emacs-yasnippet)
+ ("pyvenv" ,emacs-pyvenv)
+ ("s" ,emacs-s)))
+ (native-inputs
+ `(("ert-runner" ,ert-runner)
+ ("emacs-f" ,emacs-f)
+ ("python" ,python-wrapper)
+ ("python-autopep8" ,python-autopep8)
+ ("python-black" ,python-black)
+ ("python-flake8" ,python-flake8)
+ ("python-jedi" ,python-jedi)
+ ("python-yapf" ,python-yapf)
+ ;; For documentation.
+ ("python-sphinx" ,python-sphinx)
+ ("texinfo" ,texinfo)))
+ (home-page "https://github.com/jorgenschaefer/elpy")
+ (synopsis "Python development environment for Emacs")
+ (description "Elpy brings powerful Python editing to Emacs. It combines
+and configures a number of other packages written in Emacs Lisp as well
+as Python.")
+ (license license:gpl3+)))
+
(define-public emacs-rainbow-delimiters
(package
(name "emacs-rainbow-delimiters")
--
2.18.0
next prev parent reply other threads:[~2018-08-28 13:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-27 5:00 [bug#32538] [PATCH] Add emacs-elpy Maxim Cournoyer
2018-08-28 13:06 ` Maxim Cournoyer [this message]
2018-09-03 21:07 ` Ludovic Courtès
2018-09-05 12:00 ` [bug#32538] [PATCHv3] " Maxim Cournoyer
2018-09-05 12:13 ` Ludovic Courtès
2018-09-05 12:24 ` Maxim Cournoyer
2018-09-06 9:05 ` Ludovic Courtès
2018-09-06 17:38 ` Leo Famulari
2018-09-11 3:08 ` Maxim Cournoyer
2018-09-11 7:09 ` Ludovic Courtès
2018-09-13 2:31 ` bug#32538: " Maxim Cournoyer
2018-09-11 13:26 ` [bug#32538] " Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zhx6abej.fsf@apteryx.i-did-not-set--mail-host-address--so-tickle-me \
--to=maxim.cournoyer@gmail.com \
--cc=32538@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).