GNU bug report logs -
#39443
[PATCH] import: pypi: Support exporting packages with .zip source.
Previous Next
Reported by: Jakub Kądziołka <kuba <at> kadziolka.net>
Date: Wed, 5 Feb 2020 18:46:02 UTC
Severity: normal
Tags: patch
Done: Marius Bakke <mbakke <at> fastmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39443 in the body.
You can then email your comments to 39443 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#39443
; Package
guix-patches
.
(Wed, 05 Feb 2020 18:46:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jakub Kądziołka <kuba <at> kadziolka.net>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Wed, 05 Feb 2020 18:46:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* guix/import/pypi.scm (make-pypi-sexp): Rename test-inputs to
native-inputs. Restructure the way pypi-uri parameters are generated.
Use pypi-uri's extension parameter when required. Add "unzip" to
native inputs when the package source is a zip file.
---
guix/import/pypi.scm | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index 354cae9c4c..a02644ff55 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -363,7 +363,11 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
(receive (guix-dependencies upstream-dependencies)
(compute-inputs source-url wheel-url temp)
(match guix-dependencies
- ((required-inputs test-inputs)
+ ((required-inputs native-inputs)
+ (when (string-suffix? ".zip" source-url)
+ (set! native-inputs (cons
+ '("unzip" ,unzip)
+ native-inputs)))
(values
`(package
(name ,(python->package-name name))
@@ -371,20 +375,29 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
(source
(origin
(method url-fetch)
- ;; PyPI URL are case sensitive, but sometimes a project
- ;; named using mixed case has a URL using lower case, so
- ;; we must work around this inconsistency. For actual
- ;; examples, compare the URLs of the "Deprecated" and
- ;; "uWSGI" PyPI packages.
- (uri ,(if (string-contains source-url name)
- `(pypi-uri ,name version)
- `(pypi-uri ,(string-downcase name) version)))
+ (uri (pypi-uri
+ ;; PyPI URL are case sensitive, but sometimes
+ ;; a project named using mixed case has a URL
+ ;; using lower case, so we must work around this
+ ;; inconsistency. For actual examples, compare
+ ;; the URLs of the "Deprecated" and "uWSGI" PyPI
+ ;; packages.
+ ,(if (string-contains source-url name)
+ name
+ (string-downcase name))
+ version
+ ;; Some packages have been released as `.zip`
+ ;; instead of the more common `.tar.gz`. For
+ ;; example, see "path-and-address".
+ ,@(if (string-suffix? ".zip" source-url)
+ '(".zip")
+ '())))
(sha256
(base32
,(guix-hash-url temp)))))
(build-system python-build-system)
,@(maybe-inputs required-inputs 'propagated-inputs)
- ,@(maybe-inputs test-inputs 'native-inputs)
+ ,@(maybe-inputs native-inputs 'native-inputs)
(home-page ,home-page)
(synopsis ,synopsis)
(description ,description)
--
2.25.0
Reply sent
to
Marius Bakke <mbakke <at> fastmail.com>
:
You have taken responsibility.
(Wed, 05 Feb 2020 21:05:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jakub Kądziołka <kuba <at> kadziolka.net>
:
bug acknowledged by developer.
(Wed, 05 Feb 2020 21:05:01 GMT)
Full text and
rfc822 format available.
Message #10 received at 39443-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Jakub Kądziołka <kuba <at> kadziolka.net> writes:
> * guix/import/pypi.scm (make-pypi-sexp): Rename test-inputs to
> native-inputs. Restructure the way pypi-uri parameters are generated.
> Use pypi-uri's extension parameter when required. Add "unzip" to
> native inputs when the package source is a zip file.
Applied, thanks! I also added a copyright line for you.
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 05 Mar 2020 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 101 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.