[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#57460] [PATCH 14/20] refresh: Allow updating to a specific version
From: |
Hartmut Goebel |
Subject: |
[bug#57460] [PATCH 14/20] refresh: Allow updating to a specific version (pypi) |
Date: |
Sun, 28 Aug 2022 15:18:40 +0200 |
* guix/import/pypi.scm(latest-release): Rename to (import-release),
add keyword-argument 'version' and pass it on to called functions.
---
guix/import/pypi.scm | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index 3e3e949283..1ab48de71b 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2022 Vivien Kraus <vivien@planete-kraus.eu>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -556,15 +557,15 @@ source. To build it from source, refer to the upstream
repository at
(string-prefix? "https://pypi.org/packages" url)
(string-prefix? "https://files.pythonhosted.org/packages" url)))))
-(define (latest-release package)
+(define* (import-release package #:key (version #f))
"Return an <upstream-source> for the latest release of PACKAGE."
(let* ((pypi-name (guix-package->pypi-name package))
(pypi-package (pypi-fetch pypi-name)))
(and pypi-package
(guard (c ((missing-source-error? c) #f))
(let* ((info (pypi-project-info pypi-package))
- (version (project-info-version info))
- (dist (source-release pypi-package))
+ (version (or version (project-info-version info)))
+ (dist (source-release pypi-package version))
(url (distribution-url dist)))
(upstream-source
(urls (list url))
@@ -574,7 +575,7 @@ source. To build it from source, refer to the upstream
repository at
#f))
(input-changes
(changed-inputs package
- (pypi->guix-package pypi-name)))
+ (pypi->guix-package pypi-name #:version
version)))
(package (package-name package))
(version version)))))))
@@ -583,4 +584,4 @@ source. To build it from source, refer to the upstream
repository at
(name 'pypi)
(description "Updater for PyPI packages")
(pred pypi-package?)
- (import latest-release)))
+ (import import-release)))
--
2.30.4
- [bug#57460] [PATCH 02/20] import: cpan: Remove unused exports., (continued)
- [bug#57460] [PATCH 02/20] import: cpan: Remove unused exports., Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 04/20] import: sourceforge: Issue error-message if version is given., Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 03/20] updaters: Issue error-message if version is given:, Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 05/20] refresh: Allow updating to a specific version (gnu-maintenance), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 06/20] refresh: Allow updating to a specific version (crate), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 07/20] refresh: Allow updating to a specific version (egg), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 10/20] refresh: Allow updating to a specific version (gnome), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 11/20] refresh: Allow updating to a specific version (hexpm), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 12/20] refresh: Allow updating to a specific version (kde), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 14/20] refresh: Allow updating to a specific version (pypi),
Hartmut Goebel <=
- [bug#57460] [PATCH 15/20] refresh: Allow updating to a specific version (script), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 09/20] refresh: Allow updating to a specific version (github), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 08/20] refresh: Allow updating to a specific version (git), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 13/20] refresh: Allow updating to a specific version (launchpad), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 16/20] refresh: Allow updating to a specific version (upstream), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 17/20] refresh: Allow updating to a specific version (documentation), Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 18/20] TEMP REMOVE import: git: Restrict to non-github origins., Hartmut Goebel, 2022/08/28
- [bug#57460] [PATCH 19/20] TEMP REMOVE upstream: Output names of importers tried., Hartmut Goebel, 2022/08/28