gnu: python2-requests: Remove dependency on python-charset-normalizer.

The python-charset-normalizer package is Python 3 only.

* gnu/packages/python-web.scm (python-requests)[properties]: New field.
(python2-requests): Rewrite to remove 'python-charset-normalizer' from
'propagated-inputs'.
This commit is contained in:
Ludovic Courtès 2021-11-28 23:04:51 +01:00
parent 8ecc99be11
commit 57b62e5bb9
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -2547,10 +2547,17 @@ (define-public python-requests
(description
"Requests is a Python HTTP client library. It aims to be easier to use
than Pythons urllib2 library.")
(license license:asl2.0)))
(license license:asl2.0)
(properties `((python2-variant . ,(delay python2-requests))))))
(define-public python2-requests
(package-with-python2 python-requests))
(let ((base (package-with-python2 (strip-python2-variant python-requests))))
(package
(inherit base)
;; The python-charset-normalizer dependency is necessary on Python 3
;; only.
(propagated-inputs (modify-inputs (package-propagated-inputs base)
(delete "python-charset-normalizer"))))))
(define-public python-requests-unixsocket
(package