summaryrefslogtreecommitdiff
path: root/guix/import/pypi.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-04-14 21:40:20 +0200
committerLudovic Courtès <ludo@gnu.org>2016-04-15 00:32:18 +0200
commit7d27a0259bc7a37c04b17ffc2953837fcc3e75ff (patch)
treec4128169bccde428937d5844c0547c7e3b6059a9 /guix/import/pypi.scm
parent85c7e8e611be1bdc2eed47e61e9ff45d92ab293d (diff)
upstream: Pass a package object to updaters.
* 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.
Diffstat (limited to 'guix/import/pypi.scm')
-rw-r--r--guix/import/pypi.scm10
1 files changed, 4 insertions, 6 deletions
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index 8ae4948147..de30f4bea6 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -40,7 +40,6 @@
#:use-module (guix upstream)
#:use-module (guix licenses)
#:use-module (guix build-system python)
- #:use-module (gnu packages)
#:use-module (gnu packages python)
#:export (pypi->guix-package
%pypi-updater))
@@ -248,16 +247,15 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
((source-url ...)
(any pypi-url? source-url))))))
-(define (latest-release guix-package)
- "Return an <upstream-source> for the latest release of GUIX-PACKAGE."
+(define (latest-release package)
+ "Return an <upstream-source> for the latest release of PACKAGE."
(guard (c ((missing-source-error? c) #f))
- (let* ((pypi-name (guix-package->pypi-name
- (specification->package guix-package)))
+ (let* ((pypi-name (guix-package->pypi-name package))
(metadata (pypi-fetch pypi-name))
(version (assoc-ref* metadata "info" "version"))
(url (assoc-ref (latest-source-release metadata) "url")))
(upstream-source
- (package guix-package)
+ (package (package-name package))
(version version)
(urls (list url))))))