pythonPackages.requests: fix dependencies for python2

* brotlicffi does not support python 2, so only include it as a build
  input of requests if requests is being built for python 3.
  otherwise, fall back to brotli.

* requests 2.26 release notes specify that charset-normalizer is only
  for python 3, while chardet is only for python 2.  correct build
  inputs to reflect this.  (charset-normalizer does not build with
  python 2.)

fixes #138584
This commit is contained in:
Matt McHenry 2021-09-28 20:25:47 -04:00
parent 31ffc50c57
commit 44c267f954

View file

@ -36,10 +36,7 @@ buildPythonPackage rec {
'';
propagatedBuildInputs = [
brotlicffi
certifi
charset-normalizer
chardet
idna
urllib3
] ++ lib.optionals (isPy3k) [
@ -47,6 +44,7 @@ buildPythonPackage rec {
charset-normalizer
] ++ lib.optionals (isPy27) [
brotli
chardet
];
checkInputs = [