Alex Kost
88981dd3e2
Add (guix scripts).
...
* guix/ui.scm: Add missing copyright lines.
(args-fold*, environment-build-options, %default-argument-handler,
parse-command-line): Move to ...
* guix/scripts.scm: ...here. New file.
* guix/scripts/archive.scm: Use it.
* guix/scripts/build.scm: Likewise.
* guix/scripts/download.scm: Likewise.
* guix/scripts/edit.scm: Likewise.
* guix/scripts/environment.scm: Likewise.
* guix/scripts/gc.scm: Likewise.
* guix/scripts/graph.scm: Likewise.
* guix/scripts/hash.scm: Likewise.
* guix/scripts/import/cpan.scm: Likewise.
* guix/scripts/import/cran.scm: Likewise.
* guix/scripts/import/elpa.scm: Likewise.
* guix/scripts/import/gem.scm: Likewise.
* guix/scripts/import/gnu.scm: Likewise.
* guix/scripts/import/hackage.scm: Likewise.
* guix/scripts/import/nix.scm: Likewise.
* guix/scripts/import/pypi.scm: Likewise.
* guix/scripts/lint.scm: Likewise.
* guix/scripts/package.scm: Likewise.
* guix/scripts/publish.scm: Likewise.
* guix/scripts/pull.scm: Likewise.
* guix/scripts/refresh.scm: Likewise.
* guix/scripts/size.scm: Likewise.
* guix/scripts/system.scm: Likewise.
* tests/ui.scm (with-environment-variable, "parse-command-line",
"parse-command-line and --no options"): Move to ...
* tests/scripts.scm: ...here. New file.
* Makefile.am (MODULES): Add guix/scripts.scm.
(SCM_TESTS): Add tests/scripts.scm.
* po/guix/POTFILES.in: Add guix/scripts.scm.
2015-09-18 21:42:06 +03:00
Ludovic Courtès
84934f40d1
import: pypi: Gracefully handle wrong argument counts.
...
* guix/scripts/import/pypi.scm (guix-import-pypi): Use 'leave' to handle
cases where ARGS has zero or two or more elements.
2014-11-05 18:04:16 +01:00
Ludovic Courtès
467a3c93db
import: pypi: Gracefully handle non-existent packages.
...
Fixes <http://bugs.gnu.org/18831 >.
Reported by Ian Denhardt <ian@zenhack.net>.
* guix/import/pypi.scm (url-fetch, json-fetch, pypi-fetch): Augment
docstring to mention #f on failure.
(pypi->guix-package): Likewise, and actually return #f on failure.
* guix/scripts/import/pypi.scm (guix-import-pypi): Call 'leave' when
'pypi->guix-package' returns #f.
2014-11-05 17:56:39 +01:00
David Thompson
1b3e968512
import: Add PyPI importer.
...
* guix/snix.scm: Delete.
* guix/import/snix.scm: New file.
* guix/import/pypi.scm: New file.
* guix/import/utils.scm: New file.
* guix/scripts/import/nix.scm: New file.
* guix/scripts/import/pypi.scm: New file.
* tests/pypi.scm: New file.
* tests/snix.scm: Import (guix import snix) module.
* guix/scripts/import.scm (%default-options, %options): Delete.
(%standard-import-options, importers): New variables.
(show-help): List importers.
(guix-import): Factor out Nix-specific logic. Delegate to correct importer
based upon first argument.
* configure.ac (HAVE_GUILE_JSON): New conditional.
* Makefile.am (MODULES): Add new files and remove 'guix/snix.scm'.
(SCM_TESTS): Add 'tests/pypi.scm' if guile-json is installed.
2014-09-29 19:30:28 -04:00