2018-09-08 00:02:55 +01:00
|
|
|
{ buildPythonPackage, lib, fetchPypi, glibcLocales, isPy3k, contextvars
|
2019-05-23 00:42:29 +01:00
|
|
|
, pythonOlder, pytest, curio
|
2018-09-08 00:02:55 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sniffio";
|
2020-11-29 14:04:42 +00:00
|
|
|
version = "1.2.0";
|
2018-09-08 00:02:55 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 14:04:42 +00:00
|
|
|
sha256 = "c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de";
|
2018-09-08 00:02:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
buildInputs = [ glibcLocales ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [ contextvars ];
|
|
|
|
|
2019-05-23 00:42:29 +01:00
|
|
|
checkInputs = [ pytest curio ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pytest
|
|
|
|
'';
|
2018-09-08 00:02:55 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/python-trio/sniffio";
|
2018-09-08 00:02:55 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
description = "Sniff out which async library your code is running under";
|
|
|
|
};
|
|
|
|
}
|