summaryrefslogtreecommitdiff
path: root/guix/import/pypi.scm
AgeCommit message (Collapse)Author
2018-06-10import: json: Consolidate duplicate json-fetch functionality.Jelle Licht
* guix/import/json.scm (json-fetch): Return a list or hash table. (json-fetch-alist): New procedure. * guix/import/github.scm (json-fetch*): Remove. (latest-released-version): Use json-fetch. * guix/import/cpan.scm (module->dist-name): Use json-fetch-alist. (cpan-fetch): Likewise. * guix/import/crate.scm (crate-fetch): Likewise. * guix/import/gem.scm (rubygems-fetch): Likewise. * guix/import/pypi.scm (pypi-fetch): Likewise. * guix/import/stackage.scm (stackage-lts-info-fetch): Likewise.
2017-10-10import: pypi: Remove unneeded import.Ludovic Courtès
* guix/import/pypi.scm: Remove unneeded import.
2017-06-15import: pypi: Always use pypi.io URL with downcased package name.Danny Milosavljevic
* guix/import/pypi.scm (make-pypi-sexp): Always use pypi.io URL with downcased package name.
2017-05-13import: pypi: Robustify latest-release.Mathieu Othacehe
* guix/import/pypi.scm (latest-release): Check if pypi-fetch has failed. If so return #f, else construct the <upstream-source>.
2017-05-03ui: Rename '_' to 'G_'.Ludovic Courtès
This avoids collisions with '_' when the latter is used as a 'match' pattern for instance. See <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>. * guix/ui.scm: Rename '_' to 'G_'. * po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly. * build-aux/compile-all.scm (warnings): Remove 'format'. * gnu/packages.scm, gnu/services.scm, gnu/services/shepherd.scm, gnu/system.scm, gnu/system/shadow.scm, guix/gnupg.scm, guix/http-client.scm, guix/import/cpan.scm, guix/import/elpa.scm, guix/import/pypi.scm, guix/nar.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/authenticate.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/container.scm, guix/scripts/container/exec.scm, guix/scripts/copy.scm, guix/scripts/download.scm, guix/scripts/edit.scm, guix/scripts/environment.scm, guix/scripts/gc.scm, guix/scripts/graph.scm, guix/scripts/hash.scm, guix/scripts/import.scm, guix/scripts/import/cpan.scm, guix/scripts/import/cran.scm, guix/scripts/import/crate.scm, guix/scripts/import/elpa.scm, guix/scripts/import/gem.scm, guix/scripts/import/gnu.scm, guix/scripts/import/hackage.scm, guix/scripts/import/nix.scm, guix/scripts/import/pypi.scm, guix/scripts/import/stackage.scm, guix/scripts/lint.scm, guix/scripts/offload.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/perform-download.scm, guix/scripts/publish.scm, guix/scripts/pull.scm, guix/scripts/refresh.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/scripts/system.scm, guix/ssh.scm, guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-02-08import: pypi: Correctly handle multiple-URL origins.Ludovic Courtès
Fixes <https://bugs.gnu.org/25635>. Reported by Sergei Trofimovich <slyfox@inbox.ru>. * guix/import/pypi.scm (guix-package->pypi-name)[url->pypi-name]: New procedure. Rewrite body to match lists in addition to strings. * tests/pypi.scm ("guix-package->pypi-name, several URLs"): New test.
2017-01-26import: pypi: Don't add setuptools to propagated-inputs.Carlo Zancanaro
* guix/import/pypi.scm (compute-inputs): Don't add setuptools to the imported package's propagated-inputs.
2016-12-20import: pypi: Match new 'pypi-uri' domain in updater.Marius Bakke
* guix/import/pypi.scm (pypi-package?): Match pypi.io domain.
2016-12-12import: json: Silence json-fetch output.Eric Bavier
* guix/import/json.scm (json-fetch): Use http-fetch instead of url-fetch to avoid writing to stdout and a temporary file for each invocation. * guix/import/gem.scm (rubygems-fetch): Do not redirect json-fetch output to /dev/null. * guix/import/pypi.scm (pypi-fetch): Likewise.
2016-10-23import: pypi: All inputs are propagated-inputs by default.Hartmut Goebel
* guix/import/pypi.scm (maybe-inputs): Return inputs as "propagated-inputs".
2016-09-28import: Move string->license to importers.David Craven
* guix/import/gem.scm (string->license): Move from (guix import utils). * guix/import/pypi.scm (string->license): Move from (guix import utils).
2016-07-26import: pypi: Correctly handle new-style URLs.Ludovic Courtès
Fixes <http://bugs.gnu.org/23997>. * guix/import/pypi.scm (guix-package->pypi-name): Rewrite using 'basename' and 'hyphen-package-name->name+version'. * tests/pypi.scm ("guix-package->pypi-name, old URL style") ("guix-package->pypi-name, new URL style"): New tests.
2016-06-25import: pypi: do not fail when 'run_requires' is missing from the metadata.Cyril Roelandt
* guix/import/pypi.scm (read-wheel-metadata): do not crash when 'run_requires' is missing from the metadata.
2016-06-14import: pypi: read requirements from wheels.Cyril Roelandt
* doc/guix.tex (Invoking guix import): Mention that the pypi importer works better with "unzip". * guix/import/pypi.scm (latest-wheel-release, wheel-url->extracted-directory): New procedures. * tests/pypi.scm (("pypi->guix-package, wheels"): New test.
2016-04-15upstream: Pass a package object to updaters.Ludovic Courtès
* guix/upstream.scm (package-update-path): Pass PACKAGE to 'latest-release'. * guix/gnu-maintenance.scm (latest-release*) (latest-gnome-release, latest-xorg-release): Adjust accordingly. * guix/import/cran.scm (latest-cran-release): (latest-bioconductor-release): Likewise. * guix/import/elpa.scm (latest-release): Likewise. * guix/import/gem.scm (latest-release): Likewise. * guix/import/github.scm (latest-release): Likewise. * guix/import/hackage.scm (latest-release): Likewise. * guix/import/pypi.scm (latest-release): Likewise.
2016-03-19import: pypi: Emit 'pypi-uri' only when it yields the right URL.Ludovic Courtès
Fixes <http://bugs.gnu.org/23062>. Reported by Danny Milosavljevic <dannym@scratchpost.org>. * guix/import/pypi.scm (make-pypi-sexp): Check whether 'pypi-uri' returns SOURCE-URL and fall back to the full URL otherwise. * tests/pypi.scm ("pypi->guix-package"): Adjust expected URI accordingly. Co-authored-by: Danny Milosavljevic <dannym@scratchpost.org>
2015-12-01import: pypi: Updater silently ignores packages without source.Ludovic Courtès
Reported by Andreas Enge <andreas@enge.fr> at <https://lists.gnu.org/archive/html/guix-devel/2015-11/msg00764.html>. * guix/import/pypi.scm (&missing-source-error): New error type. (latest-source-release): Raise it instead of using 'error'. (pypi->guix-package): Guard against it and use 'leave' to report the error. (latest-release): Guard against it and return #f when caught.
2015-11-04import: pypi: Make downloads silent.Ludovic Courtès
* guix/import/pypi.scm (pypi-fetch): Wrap body in 'call-with-output-file' and 'with-error-to-port'.
2015-11-04import: pypi: Add missing copyright line.Ludovic Courtès
* guix/import/pypi.scm: Add missing copyright line for bab020d.
2015-11-03import: pypi: add updaterCyril Roelandt
* guix/import/pypi.scm (guix-package->pypi-name, latest-release): New procedures. (%pypi-updater): New variable. * guix/scripts/refresh.scm (%updaters): Add %PYPI-UPDATER. * doc/guix.texi (Invoking guix refresh): Mention PyPI
2015-11-03import: pypi: Use "pypi-uri" instead of building the URL manually.Cyril Roelandt
* guix/import/pypi.scm (make-pypi-sexp): Use "pypi-uri". * tests/pypi.scm: Update the tests accordingly.
2015-10-05import: pypi: Remove unused procedure.Ludovic Courtès
* guix/import/pypi.scm (join): Remove.
2015-08-27import: pypi: Move generally useful procedures to utils module.David Thompson
* guix/import/pypi.scm (make-pypi-sexp): Factorize license to symbol conversion code. (string->license, snake-case, guix-hash-url): Move from here... * guix/import/utils.scm: ... to here. (license->symbol): New procedure.
2015-07-21import: pypi: Improve warning message.Ludovic Courtès
* guix/import/pypi.scm (guess-requirements): Add missing newline and quotes in warning.
2015-06-24import: pypi: Detect inputs.Cyril Roelandt
* guix/import/pypi.scm (python->package-name, maybe-inputs, compute-inputs, guess-requirements): New procedures. * guix/import/pypi.scm (guix-hash-url): Now takes a filename instead of an URL as input. * guix/import/pypi.scm (make-pypi-sexp): Now tries to generate the inputs automagically. * tests/pypi.scm: Update the test.
2015-01-09import: Factorize utility functions.Eric Bavier
* guix/import/pypi.scm (hash-table->alist, flatten, assoc-ref*, url-fetch, json-fetch): Pull procedures from here into... * guix/import/utils.scm: Here and... * guix/import/json.scm: Here. New file. * Makefile.am (MODULE)[HAVE_GUILE_JSON]: Add it. * guix/import/gnu.scm (file-sha256): Move from here to... * guix/hash.scm: Here. * tests/pypi.scm (pypi->guix-package): Update mock module reference.
2014-11-05import: pypi: Gracefully handle non-existent packages.Ludovic Courtès
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-10-22guix import pypi: Fix a typo in a docstring.Cyril Roelandt
* guix/import/pypi.scm (snake-case): Fix documentation.
2014-10-22guix import pypi: do not add "python-" to a package name if it's already there.Cyril Roelandt
* guix/import/pypi.scm (make-pypi-sexp): test whether the package name starts with "python-" before modifying it.
2014-10-22guix import pypi: add the Apache License 2.0Cyril Roelandt
* guix/import/pypi.scm (string->license): add ASL2.0.
2014-09-29import: Add PyPI importer.David Thompson
* 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.