diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2015-11-04 00:08:30 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2015-11-04 00:12:19 +0100 |
| commit | 32728adb958560268b793b4a3e48d94111b5ed2d (patch) | |
| tree | f8b4c986e578cbe3a68a20e69ae37eb19db5a3ae | |
| parent | d1cb7e9562a1b645fcd374067b4f98577fea3723 (diff) | |
import: pypi: Make downloads silent.
* guix/import/pypi.scm (pypi-fetch): Wrap body in
'call-with-output-file' and 'with-error-to-port'.
| -rw-r--r-- | guix/import/pypi.scm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index f58efd99158..7ca0cc991e5 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm | |||
| @@ -45,7 +45,14 @@ | |||
| 45 | (define (pypi-fetch name) | 45 | (define (pypi-fetch name) |
| 46 | "Return an alist representation of the PyPI metadata for the package NAME, | 46 | "Return an alist representation of the PyPI metadata for the package NAME, |
| 47 | or #f on failure." | 47 | or #f on failure." |
| 48 | (json-fetch (string-append "https://pypi.python.org/pypi/" name "/json"))) | 48 | ;; XXX: We want to silence the download progress report, which is especially |
| 49 | ;; annoying for 'guix refresh', but we have to use a file port. | ||
| 50 | (call-with-output-file "/dev/null" | ||
| 51 | (lambda (null) | ||
| 52 | (with-error-to-port null | ||
| 53 | (lambda () | ||
| 54 | (json-fetch (string-append "https://pypi.python.org/pypi/" | ||
| 55 | name "/json"))))))) | ||
| 49 | 56 | ||
| 50 | (define (latest-source-release pypi-package) | 57 | (define (latest-source-release pypi-package) |
| 51 | "Return the latest source release for PYPI-PACKAGE." | 58 | "Return the latest source release for PYPI-PACKAGE." |
