2018-05-08 15:19:48 -07:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, pythonOlder
|
|
|
|
, attrs
|
|
|
|
, sortedcontainers
|
|
|
|
, async_generator
|
|
|
|
, idna
|
|
|
|
, outcome
|
|
|
|
, contextvars
|
|
|
|
, pytest
|
|
|
|
, pyopenssl
|
|
|
|
, trustme
|
2018-09-07 16:02:55 -07:00
|
|
|
, sniffio
|
2019-07-16 14:39:54 -07:00
|
|
|
, stdenv
|
2018-10-25 11:24:56 -07:00
|
|
|
, jedi
|
|
|
|
, pylint
|
2019-10-17 02:45:45 -07:00
|
|
|
, astor
|
2019-10-24 21:38:10 -07:00
|
|
|
, yapf
|
2018-05-08 15:19:48 -07:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "trio";
|
2019-12-19 11:31:24 -08:00
|
|
|
version = "0.13.0";
|
2018-05-08 15:19:48 -07:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-12-19 11:31:24 -08:00
|
|
|
sha256 = "f1cf00054ad974c86d9b7afa187a65d79fd5995340abe01e8e4784d86f4acb30";
|
2018-05-08 15:19:48 -07:00
|
|
|
};
|
|
|
|
|
2019-10-24 21:38:10 -07:00
|
|
|
checkInputs = [ astor pytest pyopenssl trustme jedi pylint yapf ];
|
2018-05-08 15:19:48 -07:00
|
|
|
# It appears that the build sandbox doesn't include /etc/services, and these tests try to use it.
|
|
|
|
checkPhase = ''
|
2019-10-25 00:18:22 -07:00
|
|
|
HOME=$TMPDIR py.test -k 'not getnameinfo \
|
|
|
|
and not SocketType_resolve \
|
|
|
|
and not getprotobyname \
|
|
|
|
and not waitpid \
|
|
|
|
and not static_tool_sees_all_symbols'
|
2018-05-08 15:19:48 -07:00
|
|
|
'';
|
2019-10-25 00:18:22 -07:00
|
|
|
|
2018-05-08 15:19:48 -07:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
attrs
|
|
|
|
sortedcontainers
|
|
|
|
async_generator
|
|
|
|
idna
|
|
|
|
outcome
|
2018-09-07 16:02:55 -07:00
|
|
|
sniffio
|
2018-05-08 15:19:48 -07:00
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [ contextvars ];
|
|
|
|
|
2019-07-16 14:39:54 -07:00
|
|
|
# tests are failing on Darwin
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2018-05-08 15:19:48 -07:00
|
|
|
meta = {
|
|
|
|
description = "An async/await-native I/O library for humans and snake people";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://github.com/python-trio/trio";
|
2018-05-08 15:19:48 -07:00
|
|
|
license = with lib.licenses; [ mit asl20 ];
|
|
|
|
maintainers = with lib.maintainers; [ catern ];
|
|
|
|
};
|
|
|
|
}
|