0

I am testing an Emacs package on Travis CI with ert. A PR now requires the s package. This is how I currently make sure it's available in the test environment:

script:
  - $EMACS --version
  - $EMACS --batch --eval "(progn (package-initialize) (add-to-list 'package-archives (cons \"melpa\" \"https://melpa.org/packages/\") t) (package-refresh-contents) (package-install 's))"
  - $EMACS --batch -L . --eval "(progn (package-initialize) (setq byte-compile-error-on-warn t))" -f batch-byte-compile julia-repl.el
  - $EMACS --batch -L . -l ert --eval "(package-initialize)" -l julia-repl-tests.el -f ert-run-tests-batch-and-exit;

which is rather inelegant: I have to eval (package-initialize) every time, and manually install s. I have the

;; Package-Requires: ((emacs "25")(s "1.12"))

in the package header, is it possible to somehow grab and install all dependencies?

0

To answer my own question:

  1. Since --batch disables init files for Emacs, one has to keep the (package-initialize); best I could do is move it to a file and load it with -l.

  2. But dependencies do not have to be enumerated manually, package-install-file can take care of finding them all.

Details in the PR above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.