2020-04-24 23:36:52 +00:00
|
|
|
{ buildPythonPackage, lib, fetchPypi, glibcLocales, isPy3k, contextvars
|
|
|
|
, pythonOlder, pytest, curio
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sniffio";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "1.3.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-09-30 11:47:45 +00:00
|
|
|
sha256 = "sha256-5gMFxeXTFPU4klm38iqqM9j33uSXYxGSNK83VcVbkQE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
buildInputs = [ glibcLocales ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [ contextvars ];
|
|
|
|
|
|
|
|
checkInputs = [ pytest curio ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/python-trio/sniffio";
|
|
|
|
license = licenses.asl20;
|
|
|
|
description = "Sniff out which async library your code is running under";
|
|
|
|
};
|
|
|
|
}
|