* [bug#32538] [PATCH] Add emacs-elpy @ 2018-08-27 5:00 Maxim Cournoyer 2018-08-28 13:06 ` [bug#32538] [PATCHv2] " Maxim Cournoyer 2018-09-03 21:07 ` [bug#32538] [PATCH] " Ludovic Courtès 0 siblings, 2 replies; 12+ messages in thread From: Maxim Cournoyer @ 2018-08-27 5:00 UTC (permalink / raw) To: 32538 [-- Attachment #1.1: Type: text/plain, Size: 561 bytes --] 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: --8<---------------cut here---------------start------------->8--- guix package -i python-jedi python-autopep8 python-yapf python-black python-flake8 --8<---------------cut here---------------end--------------->8--- 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 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.2: 0001-gnu-python-jedi-Update-to-0.12.1.patch --] [-- Type: text/x-patch, Size: 1663 bytes --] From 4eba594f0d99feb24e4320aa8db8252811debc0a Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Sun, 26 Aug 2018 17:35:46 -0400 Subject: [PATCH 1/9] gnu: python-jedi: Update to 0.12.1. * gnu/packages/python.scm (python-jedi): Update to 0.12.1. [propagated-inputs]: Move python-parso here, as it is required at run time. --- gnu/packages/python.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 639db19a5..81217f988 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -9622,14 +9622,14 @@ characters, mouse support, and auto suggestions.") (define-public python-jedi (package (name "python-jedi") - (version "0.12.0") + (version "0.12.1") (source (origin (method url-fetch) (uri (pypi-uri "jedi" version)) (sha256 (base32 - "1bcr7csx4xil1iwmk03d79jis0bkmgi9k0kir3xa4rmwqsagcwhr")))) + "1h8ypnjisn57kiv1zqrkj1im6sbfnhxllqaa8znh39qkd47ys2dl")))) (build-system python-build-system) (arguments `(#:phases @@ -9638,8 +9638,9 @@ characters, mouse support, and auto suggestions.") (invoke "py.test" "-vv")))))) (native-inputs `(("python-pytest" ,python-pytest) - ("python-parso" ,python-parso) ("python-docopt" ,python-docopt))) + (propagated-inputs + `(("python-parso" ,python-parso))) (home-page "https://github.com/davidhalter/jedi") (synopsis "Autocompletion for Python that can be used for text editors") -- 2.18.0 [-- Attachment #1.3: 0002-gnu-Add-python-toml.patch --] [-- Type: text/x-patch, Size: 1850 bytes --] From 54130c8f5bcf683b1681e1a6c6238421bd0c6459 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Sun, 26 Aug 2018 23:56:15 -0400 Subject: [PATCH 2/9] gnu: Add python-toml. * gnu/packages/python.scm (python-toml, python2-toml): New variables. --- gnu/packages/python.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 81217f988..fb7f4b35c 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -54,6 +54,7 @@ ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com> ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org> +;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -2720,6 +2721,29 @@ which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.") (define-public python2-feedgenerator (package-with-python2 python-feedgenerator)) +(define-public python-toml + (package + (name "python-toml") + (version "0.9.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "toml" version)) + (sha256 + (base32 + "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf")))) + (build-system python-build-system) + (arguments + `(#:tests? #f)) ;no tests suite in release + (home-page "https://github.com/uiri/toml") + (synopsis "Library for TOML") + (description + "@code{toml} is a library for Tom's Obvious, Minimal Language (TOML).") + (license license:expat))) + +(define-public python2-toml + (package-with-python2 python-toml)) + (define-public python-blinker (package (name "python-blinker") -- 2.18.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.4: 0003-gnu-Add-python-black.patch --] [-- Type: text/x-patch, Size: 2207 bytes --] From c8928304cfa8d8802d97ba68a3220e68f7ad5d32 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Sun, 26 Aug 2018 23:58:26 -0400 Subject: [PATCH 3/9] gnu: Add python-black. * gnu/packages/python.scm (python-black): New variable. --- gnu/packages/python.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index fb7f4b35c..e0a990491 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -2744,6 +2744,41 @@ which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.") (define-public python2-toml (package-with-python2 python-toml)) +(define-public python-black + (package + (name "python-black") + (version "18.6b4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "black" version)) + (sha256 + (base32 + "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'patch-source-shebangs 'patch-extra-shebangs + (lambda _ + (let ((python3 (which "python3"))) + (substitute* '("tests/data/fmtonoff.py" + "tests/data/string_prefixes.py" + "tests/data/function.py") + (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version) + (string-append "#!" python3 (if (string? minor-version) + minor-version + "")))))))))) + (propagated-inputs + `(("python-click" ,python-click) + ("python-attrs" ,python-attrs) + ("python-appdirs" ,python-appdirs) + ("python-toml" ,python-toml))) + (home-page "https://github.com/ambv/black") + (synopsis "The uncompromising code formatter") + (description "Black is the uncompromising Python code formatter.") + (license license:expat))) + (define-public python-blinker (package (name "python-blinker") -- 2.18.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.5: 0004-gnu-Add-emacs-el-x.patch --] [-- Type: text/x-patch, Size: 2139 bytes --] From 46ccd0d7093f9adbe091ec6e7846719e5ad267bf Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Mon, 12 Feb 2018 22:08:03 -0500 Subject: [PATCH 4/9] gnu: Add emacs-el-x. * gnu/packages/emacs.scm (emacs-el-x): New variable. --- gnu/packages/emacs.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 92d02df49..b0199976b 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4377,6 +4377,39 @@ If you want to mark a folder manually as a project just create an empty and RSS, with a user interface inspired by notmuch.") (license license:gpl3+))) +(define-public emacs-el-x + (package + (name "emacs-el-x") + (version "0.3.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sigma/el-x.git") + (commit (string-append "v" version)))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1i6j44ssxm1xdg0mf91nh1lnprwsaxsx8vsrf720nan7mfr283h5")))) + (build-system emacs-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; Move the source files to the top level, which is included in + ;; the EMACSLOADPATH. + (add-after 'unpack 'move-source-files + (lambda _ + (let ((el-files (find-files "./lisp" ".*\\.el$"))) + (for-each (lambda (f) + (rename-file f (basename f))) + el-files)) + #t))))) + (home-page "https://github.com/sigma/el-x") + (synopsis "Emacs Lisp extensions") + (description "Defines the @code{dflet} macro to provide the historic +behavior of @code{flet}, as well as @code{declare-function} stub for older +Emacs.") + (license license:gpl2+))) + (define-public emacs-rainbow-delimiters (package (name "emacs-rainbow-delimiters") -- 2.18.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.6: 0005-gnu-Add-emacs-mocker.patch --] [-- Type: text/x-patch, Size: 1891 bytes --] From 2257b2ad0b54bcfd6f1eb0183d7e8c28f76f482e Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Mon, 12 Feb 2018 22:08:37 -0500 Subject: [PATCH 5/9] gnu: Add emacs-mocker. * gnu/packages/emacs.scm (emacs-mocker): New variable. --- gnu/packages/emacs.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index b0199976b..c6f345c0b 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4410,6 +4410,34 @@ behavior of @code{flet}, as well as @code{declare-function} stub for older Emacs.") (license license:gpl2+))) +(define-public emacs-mocker + (package + (name "emacs-mocker") + (version "0.3.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sigma/mocker.el.git") + (commit (string-append "v" version)))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1lav7am41v63xgavq8pr88y828jmd1cxd4prjq7jlbxm6nvrwxh2")))) + (build-system emacs-build-system) + (arguments + `(#:tests? #t + #:test-command '("ert-runner"))) + (native-inputs + `(("ert-runner" ,ert-runner))) + (propagated-inputs + `(("emacs-el-x" ,emacs-el-x))) + (home-page "https://github.com/sigma/mocker.el") + (synopsis "Mocking framework for Emacs Lisp") + (description "Mocker.el is a framework for writing tests in Emacs Lisp. +It uses regular Lisp rather than a domain specific language (DSL), which +maximizes flexibility (at the expense of conciseness).") + (license license:gpl2+))) + (define-public emacs-rainbow-delimiters (package (name "emacs-rainbow-delimiters") -- 2.18.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.7: 0006-gnu-Add-emacs-find-file-in-project.patch --] [-- Type: text/x-patch, Size: 2238 bytes --] From f7b567f86cc49f61a157739e1feebc9dbc749219 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Mon, 12 Feb 2018 22:09:12 -0500 Subject: [PATCH 6/9] gnu: Add emacs-find-file-in-project. * gnu/packages/emacs.scm (emacs-find-file-in-project): New variable. --- gnu/packages/emacs.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index c6f345c0b..fbbf55d78 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4438,6 +4438,38 @@ It uses regular Lisp rather than a domain specific language (DSL), which maximizes flexibility (at the expense of conciseness).") (license license:gpl2+))) +(define-public emacs-find-file-in-project + (package + (name "emacs-find-file-in-project") + (version "5.4.7") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/technomancy/find-file-in-project.git") + (commit version))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1sdnyqv69mipbgs9yax88m9b6crsa59rjhwrih197pifl4089awr")))) + (build-system emacs-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'set-shell + ;; Otherwise Emacs shell-file-name is set to "/bin/sh", which doesn't + ;; work. + (lambda _ + (setenv "SHELL" (which "sh"))))) + #:tests? #t + #:test-command '("./tests/test.sh"))) + (home-page "https://github.com/technomancy/find-file-in-project") + (synopsis "File/directory finder for Emacs") + (description "@code{find-file-in-project} allows to find files or +directories quickly in the current project. The project root is detected +automatically when Git, Subversion or Mercurial are used. It also provides +functions to assist in reviewing changes on files.") + (license license:gpl3+))) + (define-public emacs-rainbow-delimiters (package (name "emacs-rainbow-delimiters") -- 2.18.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.8: 0007-gnu-Add-emacs-pyvenv.patch --] [-- Type: text/x-patch, Size: 2037 bytes --] From e8745e62a459f271f6ef851e33381bd28cf72b5a Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Mon, 12 Feb 2018 22:09:43 -0500 Subject: [PATCH 7/9] gnu: Add emacs-pyvenv. * gnu/packages/emacs.scm (emacs-pyvenv): New variable. --- gnu/packages/emacs.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index fbbf55d78..3467fdbc8 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4470,6 +4470,37 @@ automatically when Git, Subversion or Mercurial are used. It also provides functions to assist in reviewing changes on files.") (license license:gpl3+))) +(define-public emacs-pyvenv + (package + (name "emacs-pyvenv") + (version "1.11") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jorgenschaefer/pyvenv.git") + (commit (string-append "v" version)))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1a346qdimr1dvj53q033aqnahwd2dhyn9jadrs019nm0bzgw7g63")))) + (build-system emacs-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; This phase incorrectly attempts to substitute "activate" and fails + ;; doing so. + (delete 'patch-el-files)) + #:tests? #t + #:test-command '("ert-runner"))) + (native-inputs + `(("ert-runner" ,ert-runner) + ("emacs-mocker" ,emacs-mocker))) + (home-page "https://github.com/jorgenschaefer/pyvenv") + (synopsis "Virtualenv minor mode for Emacs") + (description "pyvenv.el is a minor mode to support using Python virtual +environments (virtualenv) inside Emacs.") + (license license:gpl3+))) + (define-public emacs-rainbow-delimiters (package (name "emacs-rainbow-delimiters") -- 2.18.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.9: 0008-gnu-Add-emacs-highlight-indentation.patch --] [-- Type: text/x-patch, Size: 1964 bytes --] From c18ae613fcc42e5a85fc09859c3cf93c63b3db74 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Mon, 12 Feb 2018 22:10:03 -0500 Subject: [PATCH 8/9] gnu: Add emacs-highlight-indentation. * gnu/packages/emacs.scm (emacs-highlight-indentation): New variable. --- gnu/packages/emacs.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 3467fdbc8..797e747fb 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4501,6 +4501,30 @@ functions to assist in reviewing changes on files.") environments (virtualenv) inside Emacs.") (license license:gpl3+))) +(define-public emacs-highlight-indentation + (package + (name "emacs-highlight-indentation") + (version "0.7.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/antonj/Highlight-Indentation-for-Emacs.git") + (commit (string-append "v" version)))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "00l54k75qk24a0znzl4ij3s3nrnr2wy9ha3za8apphzlm98m907k")))) + (build-system emacs-build-system) + (home-page "https://github.com/antonj/Highlight-Indentation-for-Emacs/") + (synopsis "Highlighting indentation for Emacs") + (description "Provides two minor modes to highlight indentation guides in Emacs: +@enumerate +@item @code{highlight-indentation-mode}, which displays guidelines +indentation (space indentation only). +@item @code{ighlight-indentation-current-column-mode}, which displays guidelines for the current-point indentation (space indentation only). +@end enumerate") + (license license:gpl2+))) + (define-public emacs-rainbow-delimiters (package (name "emacs-rainbow-delimiters") -- 2.18.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.10: 0009-gnu-Add-emacs-elpy.patch --] [-- Type: text/x-patch, Size: 3293 bytes --] From ba9e9f14e83bd0467db22dd19c562916bd9418ab 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 9/9] gnu: Add emacs-elpy. * gnu/packages/emacs.scm (emacs-elpy): New variable. --- gnu/packages/emacs.scm | 58 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 797e747fb..372f72dab 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4525,6 +4525,64 @@ 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\\/" "^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"))) + ;; 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"))))) + #: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 + ;; TODO: Generate texinfo documentation. + `(("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))) + (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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#32538] [PATCHv2] Add emacs-elpy 2018-08-27 5:00 [bug#32538] [PATCH] Add emacs-elpy Maxim Cournoyer @ 2018-08-28 13:06 ` Maxim Cournoyer 2018-09-03 21:07 ` [bug#32538] [PATCH] " Ludovic Courtès 1 sibling, 0 replies; 12+ messages in thread From: Maxim Cournoyer @ 2018-08-28 13:06 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: 32538 [-- 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 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#32538] [PATCH] Add emacs-elpy 2018-08-27 5:00 [bug#32538] [PATCH] Add emacs-elpy Maxim Cournoyer 2018-08-28 13:06 ` [bug#32538] [PATCHv2] " Maxim Cournoyer @ 2018-09-03 21:07 ` Ludovic Courtès 2018-09-05 12:00 ` [bug#32538] [PATCHv3] " Maxim Cournoyer 1 sibling, 1 reply; 12+ messages in thread From: Ludovic Courtès @ 2018-09-03 21:07 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: 32538 Hello Maxim, I didn’t actually try the patch set but on a quick look it LGTM! (Including v2 of the emacs-elpy patch itself.) Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > From 54130c8f5bcf683b1681e1a6c6238421bd0c6459 Mon Sep 17 00:00:00 2001 > From: Maxim Cournoyer <maxim.cournoyer@gmail.com> > Date: Sun, 26 Aug 2018 23:56:15 -0400 > Subject: [PATCH 2/9] gnu: Add python-toml. > > * gnu/packages/python.scm (python-toml, python2-toml): New variables. [...] > + (home-page "https://github.com/uiri/toml") > + (synopsis "Library for TOML") > + (description > + "@code{toml} is a library for Tom's Obvious, Minimal Language (TOML).") > + (license license:expat))) Maybe “parser” instead of “library”? > +(define-public python2-toml > + (package-with-python2 python-toml)) There was a loose consensus that if the Python 2 variant isn’t strictly needed, then it’s best not to include it; so I think you can remove it. > From 46ccd0d7093f9adbe091ec6e7846719e5ad267bf Mon Sep 17 00:00:00 2001 > From: Maxim Cournoyer <maxim.cournoyer@gmail.com> > Date: Mon, 12 Feb 2018 22:08:03 -0500 > Subject: [PATCH 4/9] gnu: Add emacs-el-x. > > * gnu/packages/emacs.scm (emacs-el-x): New variable. [...] > + (home-page "https://github.com/sigma/el-x") > + (synopsis "Emacs Lisp extensions") > + (description "Defines the @code{dflet} macro to provide the historic > +behavior of @code{flet}, as well as @code{declare-function} stub for older > +Emacs.") Full sentence please. :-) > + (arguments > + `(#:phases > + (modify-phases %standard-phases > + (add-before 'check 'set-shell > + ;; Otherwise Emacs shell-file-name is set to "/bin/sh", which doesn't > + ;; work. > + (lambda _ > + (setenv "SHELL" (which "sh"))))) This still needs to return #t, though I think Mark’s plan is to put an end to that in the next ‘core-updates’ cycle. > + (home-page "https://github.com/antonj/Highlight-Indentation-for-Emacs/") > + (synopsis "Highlighting indentation for Emacs") > + (description "Provides two minor modes to highlight indentation guides in Emacs: > +@enumerate > +@item @code{highlight-indentation-mode}, which displays guidelines > +indentation (space indentation only). > +@item @code{ighlight-indentation-current-column-mode}, which displays guidelines for the current-point indentation (space indentation only). ^ Typo. > + (arguments > + `(#:include (cons* "^elpy\\/" "^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"))) > + ;; 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"))))) Likewise for phase return values. > + (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.") If you could expound a little bit on the features (completion? navigation? refactoring?), that would be great. Otherwise LGTM, thanks! Ludo’. ^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#32538] [PATCHv3] Add emacs-elpy 2018-09-03 21:07 ` [bug#32538] [PATCH] " Ludovic Courtès @ 2018-09-05 12:00 ` Maxim Cournoyer 2018-09-05 12:13 ` Ludovic Courtès 0 siblings, 1 reply; 12+ messages in thread From: Maxim Cournoyer @ 2018-09-05 12:00 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 32538 [-- Attachment #1: Type: text/plain, Size: 5232 bytes --] Hello Ludovic! ludo@gnu.org (Ludovic Courtès) writes: > Hello Maxim, > > I didn’t actually try the patch set but on a quick look it LGTM! > (Including v2 of the emacs-elpy patch itself.) > > Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > >> From 54130c8f5bcf683b1681e1a6c6238421bd0c6459 Mon Sep 17 00:00:00 2001 >> From: Maxim Cournoyer <maxim.cournoyer@gmail.com> >> Date: Sun, 26 Aug 2018 23:56:15 -0400 >> Subject: [PATCH 2/9] gnu: Add python-toml. >> >> * gnu/packages/python.scm (python-toml, python2-toml): New variables. > > [...] > >> + (home-page "https://github.com/uiri/toml") >> + (synopsis "Library for TOML") >> + (description >> + "@code{toml} is a library for Tom's Obvious, Minimal Language (TOML).") >> + (license license:expat))) > > Maybe “parser” instead of “library”? I've settled for this, taking inspiration from their project's page: - "@code{toml} is a library for Tom's Obvious, Minimal Language (TOML).") + "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal +Language (TOML) configuration files.") >> +(define-public python2-toml >> + (package-with-python2 python-toml)) > > There was a loose consensus that if the Python 2 variant isn’t strictly > needed, then it’s best not to include it; so I think you can remove it. Removed. >> From 46ccd0d7093f9adbe091ec6e7846719e5ad267bf Mon Sep 17 00:00:00 2001 >> From: Maxim Cournoyer <maxim.cournoyer@gmail.com> >> Date: Mon, 12 Feb 2018 22:08:03 -0500 >> Subject: [PATCH 4/9] gnu: Add emacs-el-x. >> >> * gnu/packages/emacs.scm (emacs-el-x): New variable. > > [...] > >> + (home-page "https://github.com/sigma/el-x") >> + (synopsis "Emacs Lisp extensions") >> + (description "Defines the @code{dflet} macro to provide the historic >> +behavior of @code{flet}, as well as @code{declare-function} stub for older >> +Emacs.") > > Full sentence please. :-) It now reads as: - (description "Defines the @code{dflet} macro to provide the historic -behavior of @code{flet}, as well as @code{declare-function} stub for older -Emacs.") + (description "command@{emacs-el-x} defines the @code{dflet} macro to +provide the historic behavior of @code{flet}, as well as +@code{declare-function} stub for older Emacs.") >> + (arguments >> + `(#:phases >> + (modify-phases %standard-phases >> + (add-before 'check 'set-shell >> + ;; Otherwise Emacs shell-file-name is set to "/bin/sh", which doesn't >> + ;; work. >> + (lambda _ >> + (setenv "SHELL" (which "sh"))))) > > This still needs to return #t, though I think Mark’s plan is to put an > end to that in the next ‘core-updates’ cycle. Done. > >> + (home-page "https://github.com/antonj/Highlight-Indentation-for-Emacs/") >> + (synopsis "Highlighting indentation for Emacs") >> + (description "Provides two minor modes to highlight indentation guides in Emacs: >> +@enumerate >> +@item @code{highlight-indentation-mode}, which displays guidelines >> +indentation (space indentation only). >> +@item @code{ighlight-indentation-current-column-mode}, which displays guidelines for the current-point indentation (space indentation only). > ^ > Typo. Fixed. >> + (arguments >> + `(#:include (cons* "^elpy\\/" "^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"))) >> + ;; 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"))))) > > Likewise for phase return values. Fixed! > >> + (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.") > > If you could expound a little bit on the features (completion? > navigation? refactoring?), that would be great. It now reads as: -and configures a number of other packages written in Emacs Lisp as well -as Python.") +and configures a number of other packages written in Emacs Lisp as well as +Python, together offering features such as navigation, documentation, +completion, interactive development and more.") I'm resending the modified full series of patches as v3, for ease of use. Thank you for reviewing! Maxim [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-gnu-python-parso-Update-to-0.3.1.patch --] [-- Type: text/x-patch, Size: 1075 bytes --] From 82219e988c770cea162fe4f8d8980c7f65964a6a Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Sun, 26 Aug 2018 17:34:57 -0400 Subject: [PATCH 01/10] gnu: python-parso: Update to 0.3.1. * gnu/packages/python.scm (python-parso): Update to 0.3.1. --- gnu/packages/python.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index fd1fdbf82..08a4ab2c8 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -13502,14 +13502,14 @@ time-based (TOTP) passwords.") (define-public python-parso (package (name "python-parso") - (version "0.2.1") + (version "0.3.1") (source (origin (method url-fetch) (uri (pypi-uri "parso" version)) (sha256 (base32 - "0zvh4rdhv2wkglkgh0h9kn9ndpsw5p639wcwv47jn1kfp504lq7h")))) + "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m")))) (native-inputs `(("python-pytest" ,python-pytest))) (build-system python-build-system) -- 2.18.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #3: 0002-gnu-python-jedi-Update-to-0.12.1.patch --] [-- Type: text/x-patch, Size: 1619 bytes --] From 2aa56bdad52e1758f504df2eb21529b81bd97a4b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Sun, 26 Aug 2018 17:35:46 -0400 Subject: [PATCH 02/10] gnu: python-jedi: Update to 0.12.1. * gnu/packages/python.scm (python-jedi): Update to 0.12.1. [propagated-inputs]: Move python-parso here, as it is required at run time. --- gnu/packages/python.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 08a4ab2c8..c333cfc3a 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -9622,14 +9622,14 @@ characters, mouse support, and auto suggestions.") (define-public python-jedi (package (name "python-jedi") - (version "0.12.0") + (version "0.12.1") (source (origin (method url-fetch) (uri (pypi-uri "jedi" version)) (sha256 (base32 - "1bcr7csx4xil1iwmk03d79jis0bkmgi9k0kir3xa4rmwqsagcwhr")))) + "1h8ypnjisn57kiv1zqrkj1im6sbfnhxllqaa8znh39qkd47ys2dl")))) (build-system python-build-system) (arguments `(#:phases @@ -9638,8 +9638,9 @@ characters, mouse support, and auto suggestions.") (invoke "py.test" "-vv")))))) (native-inputs `(("python-pytest" ,python-pytest) - ("python-parso" ,python-parso) ("python-docopt" ,python-docopt))) + (propagated-inputs + `(("python-parso" ,python-parso))) (home-page "https://github.com/davidhalter/jedi") (synopsis "Autocompletion for Python that can be used for text editors") -- 2.18.0 [-- Attachment #4: 0003-gnu-Add-python-toml.patch --] [-- Type: text/x-patch, Size: 1806 bytes --] From b7620ad52298b1787248b898dbe46b14be4b560d Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Sun, 26 Aug 2018 23:56:15 -0400 Subject: [PATCH 03/10] gnu: Add python-toml. * gnu/packages/python.scm (python-toml): New variables. --- gnu/packages/python.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index c333cfc3a..27a1378bf 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -54,6 +54,7 @@ ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com> ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org> +;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -2721,6 +2722,27 @@ which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.") (define-public python2-feedgenerator (package-with-python2 python-feedgenerator)) +(define-public python-toml + (package + (name "python-toml") + (version "0.9.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "toml" version)) + (sha256 + (base32 + "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf")))) + (build-system python-build-system) + (arguments + `(#:tests? #f)) ;no tests suite in release + (home-page "https://github.com/uiri/toml") + (synopsis "Library for TOML") + (description + "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal +Language (TOML) configuration files.") + (license license:expat))) + (define-public python-blinker (package (name "python-blinker") -- 2.18.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #5: 0004-gnu-Add-python-black.patch --] [-- Type: text/x-patch, Size: 2153 bytes --] From 696b05fe7c47201bff8f9a60818ca5afa60b3df4 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Sun, 26 Aug 2018 23:58:26 -0400 Subject: [PATCH 04/10] gnu: Add python-black. * gnu/packages/python.scm (python-black): New variable. --- gnu/packages/python.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 27a1378bf..5a0551185 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -2743,6 +2743,41 @@ which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.") Language (TOML) configuration files.") (license license:expat))) +(define-public python-black + (package + (name "python-black") + (version "18.6b4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "black" version)) + (sha256 + (base32 + "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'patch-source-shebangs 'patch-extra-shebangs + (lambda _ + (let ((python3 (which "python3"))) + (substitute* '("tests/data/fmtonoff.py" + "tests/data/string_prefixes.py" + "tests/data/function.py") + (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version) + (string-append "#!" python3 (if (string? minor-version) + minor-version + "")))))))))) + (propagated-inputs + `(("python-click" ,python-click) + ("python-attrs" ,python-attrs) + ("python-appdirs" ,python-appdirs) + ("python-toml" ,python-toml))) + (home-page "https://github.com/ambv/black") + (synopsis "The uncompromising code formatter") + (description "Black is the uncompromising Python code formatter.") + (license license:expat))) + (define-public python-blinker (package (name "python-blinker") -- 2.18.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #6: 0005-gnu-Add-emacs-el-x.patch --] [-- Type: text/x-patch, Size: 2105 bytes --] From cb7db8bdeb6a8a3ad9832efbef56932979e2ac87 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Mon, 12 Feb 2018 22:08:03 -0500 Subject: [PATCH 05/10] gnu: Add emacs-el-x. * gnu/packages/emacs.scm (emacs-el-x): New variable. --- gnu/packages/emacs.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 08554280c..3a2dac476 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4408,6 +4408,39 @@ If you want to mark a folder manually as a project just create an empty and RSS, with a user interface inspired by notmuch.") (license license:gpl3+))) +(define-public emacs-el-x + (package + (name "emacs-el-x") + (version "0.3.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sigma/el-x.git") + (commit (string-append "v" version)))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1i6j44ssxm1xdg0mf91nh1lnprwsaxsx8vsrf720nan7mfr283h5")))) + (build-system emacs-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; Move the source files to the top level, which is included in + ;; the EMACSLOADPATH. + (add-after 'unpack 'move-source-files + (lambda _ + (let ((el-files (find-files "./lisp" ".*\\.el$"))) + (for-each (lambda (f) + (rename-file f (basename f))) + el-files)) + #t))))) + (home-page "https://github.com/sigma/el-x") + (synopsis "Emacs Lisp extensions") + (description "command@{emacs-el-x} defines the @code{dflet} macro to +provide the historic behavior of @code{flet}, as well as +@code{declare-function} stub for older Emacs.") + (license license:gpl2+))) + (define-public emacs-rainbow-delimiters (package (name "emacs-rainbow-delimiters") -- 2.18.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #7: 0006-gnu-Add-emacs-mocker.patch --] [-- Type: text/x-patch, Size: 1862 bytes --] From 0a5e5ea51be524b2cb5f18cbeaf3710aa787601b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Mon, 12 Feb 2018 22:08:37 -0500 Subject: [PATCH 06/10] gnu: Add emacs-mocker. * gnu/packages/emacs.scm (emacs-mocker): New variable. --- gnu/packages/emacs.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 3a2dac476..4127cd10a 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4441,6 +4441,34 @@ provide the historic behavior of @code{flet}, as well as @code{declare-function} stub for older Emacs.") (license license:gpl2+))) +(define-public emacs-mocker + (package + (name "emacs-mocker") + (version "0.3.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sigma/mocker.el.git") + (commit (string-append "v" version)))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1lav7am41v63xgavq8pr88y828jmd1cxd4prjq7jlbxm6nvrwxh2")))) + (build-system emacs-build-system) + (arguments + `(#:tests? #t + #:test-command '("ert-runner"))) + (native-inputs + `(("ert-runner" ,ert-runner))) + (propagated-inputs + `(("emacs-el-x" ,emacs-el-x))) + (home-page "https://github.com/sigma/mocker.el") + (synopsis "Mocking framework for Emacs Lisp") + (description "Mocker.el is a framework for writing tests in Emacs Lisp. +It uses regular Lisp rather than a domain specific language (DSL), which +maximizes flexibility (at the expense of conciseness).") + (license license:gpl2+))) + (define-public emacs-rainbow-delimiters (package (name "emacs-rainbow-delimiters") -- 2.18.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #8: 0007-gnu-Add-emacs-find-file-in-project.patch --] [-- Type: text/x-patch, Size: 2202 bytes --] From 389884afef7a7107411103eb6fb1a6dca4f99ce6 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Mon, 12 Feb 2018 22:09:12 -0500 Subject: [PATCH 07/10] gnu: Add emacs-find-file-in-project. * gnu/packages/emacs.scm (emacs-find-file-in-project): New variable. --- gnu/packages/emacs.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 4127cd10a..6445e54a3 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4469,6 +4469,39 @@ It uses regular Lisp rather than a domain specific language (DSL), which maximizes flexibility (at the expense of conciseness).") (license license:gpl2+))) +(define-public emacs-find-file-in-project + (package + (name "emacs-find-file-in-project") + (version "5.4.7") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/technomancy/find-file-in-project.git") + (commit version))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1sdnyqv69mipbgs9yax88m9b6crsa59rjhwrih197pifl4089awr")))) + (build-system emacs-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'set-shell + ;; Otherwise Emacs shell-file-name is set to "/bin/sh", which doesn't + ;; work. + (lambda _ + (setenv "SHELL" (which "sh")) + #t))) + #:tests? #t + #:test-command '("./tests/test.sh"))) + (home-page "https://github.com/technomancy/find-file-in-project") + (synopsis "File/directory finder for Emacs") + (description "@code{find-file-in-project} allows to find files or +directories quickly in the current project. The project root is detected +automatically when Git, Subversion or Mercurial are used. It also provides +functions to assist in reviewing changes on files.") + (license license:gpl3+))) + (define-public emacs-rainbow-delimiters (package (name "emacs-rainbow-delimiters") -- 2.18.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #9: 0008-gnu-Add-emacs-pyvenv.patch --] [-- Type: text/x-patch, Size: 1984 bytes --] From 2d4b239c6dc2ea904bdcbacb19bd7c0c24b2b318 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Mon, 12 Feb 2018 22:09:43 -0500 Subject: [PATCH 08/10] gnu: Add emacs-pyvenv. * gnu/packages/emacs.scm (emacs-pyvenv): New variable. --- gnu/packages/emacs.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 6445e54a3..aa42ec092 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4502,6 +4502,37 @@ automatically when Git, Subversion or Mercurial are used. It also provides functions to assist in reviewing changes on files.") (license license:gpl3+))) +(define-public emacs-pyvenv + (package + (name "emacs-pyvenv") + (version "1.11") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jorgenschaefer/pyvenv.git") + (commit (string-append "v" version)))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1a346qdimr1dvj53q033aqnahwd2dhyn9jadrs019nm0bzgw7g63")))) + (build-system emacs-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; This phase incorrectly attempts to substitute "activate" and fails + ;; doing so. + (delete 'patch-el-files)) + #:tests? #t + #:test-command '("ert-runner"))) + (native-inputs + `(("ert-runner" ,ert-runner) + ("emacs-mocker" ,emacs-mocker))) + (home-page "https://github.com/jorgenschaefer/pyvenv") + (synopsis "Virtualenv minor mode for Emacs") + (description "pyvenv.el is a minor mode to support using Python virtual +environments (virtualenv) inside Emacs.") + (license license:gpl3+))) + (define-public emacs-rainbow-delimiters (package (name "emacs-rainbow-delimiters") -- 2.18.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #10: 0009-gnu-Add-emacs-highlight-indentation.patch --] [-- Type: text/x-patch, Size: 1919 bytes --] From 57de32e6190af4a4b92bb66904aa8081875ae366 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Mon, 12 Feb 2018 22:10:03 -0500 Subject: [PATCH 09/10] gnu: Add emacs-highlight-indentation. * gnu/packages/emacs.scm (emacs-highlight-indentation): New variable. --- gnu/packages/emacs.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index aa42ec092..7381e69dc 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4533,6 +4533,30 @@ functions to assist in reviewing changes on files.") environments (virtualenv) inside Emacs.") (license license:gpl3+))) +(define-public emacs-highlight-indentation + (package + (name "emacs-highlight-indentation") + (version "0.7.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/antonj/Highlight-Indentation-for-Emacs.git") + (commit (string-append "v" version)))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "00l54k75qk24a0znzl4ij3s3nrnr2wy9ha3za8apphzlm98m907k")))) + (build-system emacs-build-system) + (home-page "https://github.com/antonj/Highlight-Indentation-for-Emacs/") + (synopsis "Highlighting indentation for Emacs") + (description "Provides two minor modes to highlight indentation guides in Emacs: +@enumerate +@item @code{highlight-indentation-mode}, which displays guidelines +indentation (space indentation only). +@item @code{highlight-indentation-current-column-mode}, which displays guidelines for the current-point indentation (space indentation only). +@end enumerate") + (license license:gpl2+))) + (define-public emacs-rainbow-delimiters (package (name "emacs-rainbow-delimiters") -- 2.18.0 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #11: 0010-gnu-Add-emacs-elpy.patch --] [-- Type: text/x-patch, Size: 4164 bytes --] From 4909e3f48bfe003be058d4a7bc32bfd0af65adfb 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 10/10] gnu: Add emacs-elpy. * gnu/packages/emacs.scm (emacs-elpy): New variable. --- gnu/packages/emacs.scm | 79 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 7381e69dc..a0c7acb72 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4557,6 +4557,85 @@ 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")) + #t)) + (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, together offering features such as navigation, documentation, +completion, interactive development and more.") + (license license:gpl3+))) + (define-public emacs-rainbow-delimiters (package (name "emacs-rainbow-delimiters") -- 2.18.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#32538] [PATCHv3] Add emacs-elpy 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 0 siblings, 1 reply; 12+ messages in thread From: Ludovic Courtès @ 2018-09-05 12:13 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: 32538 Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > I'm resending the modified full series of patches as v3, for ease of > use. Great, I think you can go ahead and push. Thanks, Ludo’. ^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#32538] [PATCHv3] Add emacs-elpy 2018-09-05 12:13 ` Ludovic Courtès @ 2018-09-05 12:24 ` Maxim Cournoyer 2018-09-06 9:05 ` Ludovic Courtès 0 siblings, 1 reply; 12+ messages in thread From: Maxim Cournoyer @ 2018-09-05 12:24 UTC (permalink / raw) To: ludo; +Cc: 32538 On September 5, 2018 12:13:05 PM UTC, ludo@gnu.org wrote: >Hi Maxim, > >Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > >> I'm resending the modified full series of patches as v3, for ease of >> use. > >Great, I think you can go ahead and push. > >Thanks, >Ludo’. Hi Ludovic, I don't have push access at the moment; how should we proceed? Maxim ^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#32538] [PATCHv3] Add emacs-elpy 2018-09-05 12:24 ` Maxim Cournoyer @ 2018-09-06 9:05 ` Ludovic Courtès 2018-09-06 17:38 ` Leo Famulari 0 siblings, 1 reply; 12+ messages in thread From: Ludovic Courtès @ 2018-09-06 9:05 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: Ricardo Wurmus, 32538 [-- Attachment #1: Type: text/plain, Size: 448 bytes --] Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > I don't have push access at the moment; how should we proceed? Sorry, I thought you had push access. Well, let’s fix this: can you create an account on Savannah, upload the OpenPGP key you will be using to sign commits, and let me know the account name? Please send a reply signed with the key you’ll be using to sign commits. Thanks in advance! Ludo’. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#32538] [PATCHv3] Add emacs-elpy 2018-09-06 9:05 ` Ludovic Courtès @ 2018-09-06 17:38 ` Leo Famulari 2018-09-11 3:08 ` Maxim Cournoyer 0 siblings, 1 reply; 12+ messages in thread From: Leo Famulari @ 2018-09-06 17:38 UTC (permalink / raw) To: Ludovic Courtès; +Cc: Ricardo Wurmus, 32538 [-- Attachment #1: Type: text/plain, Size: 482 bytes --] On Thu, Sep 06, 2018 at 11:05:11AM +0200, Ludovic Courtès wrote: > Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > > > I don't have push access at the moment; how should we proceed? > > Well, let’s fix this: can you create an account on Savannah, upload the > OpenPGP key you will be using to sign commits, and let me know the > account name? Welcome! Please be sure to read 'HACKING' in the Guix source tree, and let us know if you have any questions :) [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#32538] [PATCHv3] Add emacs-elpy 2018-09-06 17:38 ` Leo Famulari @ 2018-09-11 3:08 ` Maxim Cournoyer 2018-09-11 7:09 ` Ludovic Courtès 2018-09-11 13:26 ` [bug#32538] " Ricardo Wurmus 0 siblings, 2 replies; 12+ messages in thread From: Maxim Cournoyer @ 2018-09-11 3:08 UTC (permalink / raw) To: Leo Famulari; +Cc: Ricardo Wurmus, 32538 [-- Attachment #1: Type: text/plain, Size: 825 bytes --] Hello, and sorry for the delay. Leo Famulari <leo@famulari.name> writes: > On Thu, Sep 06, 2018 at 11:05:11AM +0200, Ludovic Courtès wrote: >> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: >> >> > I don't have push access at the moment; how should we proceed? >> >> Well, let’s fix this: can you create an account on Savannah, upload the >> OpenPGP key you will be using to sign commits, and let me know the >> account name? > > Welcome! > > Please be sure to read 'HACKING' in the Guix source tree, and let us > know if you have any questions :) I've done the necessary readings, thanks for pointing me to it. I've set the pre-push git hook to protect against pushing any unsigned commit. I've created my user account at Savannah; the username is 'apteryx'. Thank you! :) Maxim [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#32538] [PATCHv3] Add emacs-elpy 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 1 sibling, 1 reply; 12+ messages in thread From: Ludovic Courtès @ 2018-09-11 7:09 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: Ricardo Wurmus, 32538 [-- Attachment #1: Type: text/plain, Size: 985 bytes --] Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > Leo Famulari <leo@famulari.name> writes: > >> On Thu, Sep 06, 2018 at 11:05:11AM +0200, Ludovic Courtès wrote: >>> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: >>> >>> > I don't have push access at the moment; how should we proceed? >>> >>> Well, let’s fix this: can you create an account on Savannah, upload the >>> OpenPGP key you will be using to sign commits, and let me know the >>> account name? >> >> Welcome! >> >> Please be sure to read 'HACKING' in the Guix source tree, and let us >> know if you have any questions :) > > I've done the necessary readings, thanks for pointing me to it. I've > set the pre-push git hook to protect against pushing any unsigned > commit. Alright! > I've created my user account at Savannah; the username is 'apteryx'. Thanks, I’ve added you, so you can go ahead and push this patch series. Welcome on board! :-) Ludo’. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#32538: [PATCHv3] Add emacs-elpy 2018-09-11 7:09 ` Ludovic Courtès @ 2018-09-13 2:31 ` Maxim Cournoyer 0 siblings, 0 replies; 12+ messages in thread From: Maxim Cournoyer @ 2018-09-13 2:31 UTC (permalink / raw) To: Ludovic Courtès; +Cc: Ricardo Wurmus, 32538-done [-- Attachment #1: Type: text/plain, Size: 515 bytes --] Hello, ludo@gnu.org (Ludovic Courtès) writes: [...] >> I've created my user account at Savannah; the username is 'apteryx'. > > Thanks, I’ve added you, so you can go ahead and push this patch series. > > Welcome on board! :-) I've pushed this patch series to master as 82baeea2979b98a642dcfe63a87d08355a101f4c, after refreshing emacs-elpy to its latest version (1.24) and testing it a bit to make sure everything was still in order. Thanks for the review and the warm welcome :) Maxim [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#32538] [PATCHv3] Add emacs-elpy 2018-09-11 3:08 ` Maxim Cournoyer 2018-09-11 7:09 ` Ludovic Courtès @ 2018-09-11 13:26 ` Ricardo Wurmus 1 sibling, 0 replies; 12+ messages in thread From: Ricardo Wurmus @ 2018-09-11 13:26 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: 32538 Hi Maxim, > Leo Famulari <leo@famulari.name> writes: > >> On Thu, Sep 06, 2018 at 11:05:11AM +0200, Ludovic Courtès wrote: >>> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: >>> >>> > I don't have push access at the moment; how should we proceed? >>> >>> Well, let’s fix this: can you create an account on Savannah, upload the >>> OpenPGP key you will be using to sign commits, and let me know the >>> account name? >> >> Welcome! >> >> Please be sure to read 'HACKING' in the Guix source tree, and let us >> know if you have any questions :) > > I've done the necessary readings, thanks for pointing me to it. I've > set the pre-push git hook to protect against pushing any unsigned > commit. > > I've created my user account at Savannah; the username is 'apteryx'. Great! Welcome, Maxim! -- Ricardo ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2018-09-13 2:32 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-08-27 5:00 [bug#32538] [PATCH] Add emacs-elpy Maxim Cournoyer 2018-08-28 13:06 ` [bug#32538] [PATCHv2] " Maxim Cournoyer 2018-09-03 21:07 ` [bug#32538] [PATCH] " 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
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.