guix_mirror_bot pushed a commit to branch master
in repository guix.
commit e495692279ce1adb48364f682144f9eb55e17305
Author: Morgan Smith <[email protected]>
AuthorDate: Tue Sep 8 19:11:21 2026 -0400
gnu: emacs-elpy: Update to 1.35.0-4.9cdf26d.
* gnu/packages/emacs-xyz.scm (emacs-elpy): Update to 1.35.0-4.9cdf26d.
[arguments]: Convert to list of G-Expressions.
[#:test-command]: Use “emacs -Q --batch …”.
[#:phases]<adapt-to-hideshow-changes>: New phase.
<disable-broken-tests>: Adjust to new failures.
[native-inputs]: Remove ‘emacs-ert-runner’.
Signed-off-by: Liliana Marie Prikler <[email protected]>
---
gnu/packages/emacs-xyz.scm | 161 ++++++++++++++++++++++++---------------------
1 file changed, 85 insertions(+), 76 deletions(-)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 187c2926e81..cf0d01bc606 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -20183,91 +20183,101 @@ indentation guides in Emacs:
;; https://github.com/jorgenschaefer/elpy/issues/1824
;; https://github.com/jorgenschaefer/elpy/pull/1951
;; https://github.com/jorgenschaefer/elpy/issues/1940.
- (let ((commit "0b381f55969438ab2ccc2d1a1614045fcf7c9545")
- (revision "3"))
+ (let ((commit "9cdf26dfea1cb044b3cf1dfa9755b6479bfd9a1c")
+ (revision "4"))
(package
(name "emacs-elpy")
(version (git-version "1.35.0" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/jorgenschaefer/elpy")
- (commit commit)))
+ (url "https://github.com/jorgenschaefer/elpy")
+ (commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
- "0398zwzq5c33fi8icyy2x50q7rs819i5xkpmhbfm1s34m6prv46a"))))
+ "13pkr52vzz9fkp4062zrqdxh04rscka5f1anl9lk730z8c7p5f23"))))
(build-system emacs-build-system)
(arguments
- `(#:include (cons* "^elpy/[^/]+\\.py$" "^snippets\\/" %default-include)
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'disable-broken-tests
- ;; Some tests are known to have problems with Python 3.9; disable
- ;; them (see:
- ;; https://github.com/jorgenschaefer/elpy/issues/1856).
- ;; Aggressively remove the modules where failing tests were
- ;; discovered, as they are similar and fail in a nondeterministic
- ;; way.
- (lambda _
- (with-directory-excursion "test"
- (for-each delete-file
- (append (find-files "." "elpy-refactor")
- (find-files "." "elpy-multiedit")
- (find-files "." "elpy-pdb")
- (find-files "." "elpy-promise")))
- ;; These test fail since upgrading Emacs from version 27 to
- ;; 28.1 (see:
- ;; https://github.com/jorgenschaefer/elpy/issues/1982).
- (delete-file "elpy-project-find-git-root-test.el")
- (substitute* "elpy-company-backend-test.el"
- (("elpy-company-backend-should-add-shell-candidates.*" all)
- (string-append all " :expected-result :failed\n")))
- (substitute* "elpy-eldoc-documentation-test.el"
-
(("elpy-eldoc-documentation-should-show-object-onelinedoc.*" all)
- (string-append all " :expected-result :failed\n")))
- (substitute* "elpy-shell-send-file-test.el"
- (("elpy-shell-send-file-should-accept-large-strings.*" all)
- (string-append all " :expected-result :failed\n")))
- (substitute* "elpy-shell-echo-inputs-and-outputs-test.el"
- (("elpy-shell-should-echo-outputs.*" all)
- (string-append all " :expected-result :failed\n")))
- ;; This test started failing with Emacs 29 (see:
- ;; https://github.com/jorgenschaefer/elpy/issues/2032).
- (substitute* "elpy-folding-fold-blocks-test.el"
- (("elpy-fold-at-point-should-NOT-fold-and-unfold-functions\
--from-after.*" all)
- (string-append all " :expected-result :failed\n")))
- ;; These tests started failing with Emacs 30.
- ;; (TODO: report upstream)
- (substitute* "elpy-company-backend-test.el"
- (("elpy-company-backend-should-find-.*-prefix-string.*" all)
- (string-append all " :expected-result :failed\n")))
- (substitute* "elpy-format-code-test.el"
- (("elpy-should-format-code-with-default-formatter.*" all)
- (string-append all " :expected-result :failed\n"))))))
- ;; The default environment of the RPC uses Virtualenv to install
- ;; Python dependencies from PyPI. We don't want/need this in Guix.
- (add-before 'check 'do-not-use-virtualenv
- (lambda _
- (setenv "ELPY_TEST_DONT_USE_VIRTUALENV" "1")
- (substitute* "elpy-rpc.el"
- (("defcustom elpy-rpc-virtualenv-path 'default")
- "defcustom elpy-rpc-virtualenv-path 'system"))))
- (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")))
- (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"))))))))
+ (list
+ #:include #~(cons* "^elpy/[^/]+\\.py$" "^snippets\\/" %default-include)
+ ;; Using ert-runner here is somehow non-deterministic (sometimes it
+ ;; works, sometimes it doesn't).
+ #:test-command
+ #~(list "emacs" "-Q" "--batch"
+ "-l" "test/test-helper.el"
+ "--eval=(mapc 'load (directory-files \"test\" t \"\\.el$\"))"
+ "-f" "ert-run-tests-batch-and-exit")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'adapt-to-hideshow-changes
+ ;; In Emacs 31 the hideshow API had many incompatible changes
+ ;; that have not been addressed by elpy
+ (lambda _
+ ;; hs-make-overlay now only accepts 3 arguments instead of 5
+ (emacs-batch-edit-file "elpy.el"
+ '(progn
+ (while (search-forward "hs-make-overlay" nil t)
+ (forward-sexp 3)
+ (let ((beg (point)))
+ (up-list)
+ (backward-char)
+ (kill-region beg (point))))
+ (basic-save-buffer)))
+ (substitute* "elpy.el"
+ (("\\(hs-hide-block-at-point t\\)")
"(hs-hide-block-at-point)"))
+ (for-each delete-file
+ '("test/elpy-folding-fold-comments-test.el"
+ "test/elpy-folding-fold-docstrings-test.el"
+ "test/elpy-folding-fold-on-click-test.el"
+ "test/elpy-folding-fold-blocks-test.el"))))
+ (add-after 'unpack 'disable-broken-tests
+ ;; Some tests are known to have problems with Python 3.9; disable
+ ;; them (see:
+ ;; https://github.com/jorgenschaefer/elpy/issues/1856).
+ ;; Aggressively remove the modules where failing tests were
+ ;; discovered, as they are similar and fail in a nondeterministic
+ ;; way.
+ (lambda _
+ (with-directory-excursion "test"
+ (delete-file "elpy-shell-send-region-or-buffer-test.el")
+ (for-each
+ delete-file
+ (find-files "." "elpy-(refactor|multiedit|pdb|promise)"))
+ ;; These test fail since upgrading Emacs from version 27 to
+ ;; 28.1 (see:
+ ;; https://github.com/jorgenschaefer/elpy/issues/1982).
+ (delete-file "elpy-project-find-git-root-test.el")
+ (substitute* "elpy-shell-send-file-test.el"
+ (("elpy-shell-send-file-should-accept-large-strings.*" all)
+ (string-append all " :expected-result :failed\n")))
+ (substitute* "elpy-shell-echo-inputs-and-outputs-test.el"
+ (("elpy-shell-should-echo-outputs.*" all)
+ (string-append all " :expected-result :failed\n")))
+ ;; Not sure why this fails
+ (delete-file "elpy-rpc--get-pip-dependencies-test.el"))))
+ ;; The default environment of the RPC uses Virtualenv to install
+ ;; Python dependencies from PyPI. We don't want/need this in Guix.
+ (add-before 'check 'do-not-use-virtualenv
+ (lambda _
+ (setenv "ELPY_TEST_DONT_USE_VIRTUALENV" "1")
+ (substitute* "elpy-rpc.el"
+ (("defcustom elpy-rpc-virtualenv-path 'default")
+ "defcustom elpy-rpc-virtualenv-path 'system"))))
+ (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")))
+ (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"))))))))
(propagated-inputs
(list emacs-company
emacs-find-file-in-project
@@ -20284,8 +20294,7 @@ indentation guides in Emacs:
python-jedi
python-yapf))
(native-inputs
- (list emacs-ert-runner
- emacs-f
+ (list emacs-f
python-wrapper
;; For documentation.
python-sphinx