1{ buildPythonPackage, lib, fetchPypi, glibcLocales, isPy3k, contextvars
2, pythonOlder
3}:
4
5buildPythonPackage rec {
6 pname = "sniffio";
7 version = "1.0.0";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "1dzb0nx3m1hpjgsv6s6w5ac2jcmywcz6gqnfkw8rwz1vkr1836rf";
12 };
13
14 # breaks with the following error:
15 # > TypeError: 'encoding' is an invalid keyword argument for this function
16 disabled = !isPy3k;
17
18 buildInputs = [ glibcLocales ];
19
20 propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [ contextvars ];
21
22 # no tests distributed with PyPI
23 doCheck = false;
24
25 meta = with lib; {
26 homepage = https://github.com/python-trio/sniffio;
27 license = licenses.asl20;
28 description = "Sniff out which async library your code is running under";
29 };
30}