2018-05-08 23:19:48 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, pythonOlder
|
|
|
|
, attrs
|
|
|
|
, sortedcontainers
|
|
|
|
, async_generator
|
|
|
|
, idna
|
|
|
|
, outcome
|
|
|
|
, contextvars
|
|
|
|
, pytest
|
|
|
|
, pyopenssl
|
|
|
|
, trustme
|
2018-09-08 00:02:55 +01:00
|
|
|
, sniffio
|
2018-05-08 23:19:48 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "trio";
|
2018-10-02 11:52:58 +01:00
|
|
|
version = "0.7.0";
|
2018-05-08 23:19:48 +01:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-10-02 11:52:58 +01:00
|
|
|
sha256 = "0df152qnj4xgxrxzd8619f8h77mzry7z8sp4m76fi21gnrcr297n";
|
2018-05-08 23:19:48 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ pytest pyopenssl trustme ];
|
|
|
|
# It appears that the build sandbox doesn't include /etc/services, and these tests try to use it.
|
|
|
|
checkPhase = ''
|
|
|
|
py.test -k 'not test_getnameinfo and not test_SocketType_resolve and not test_getprotobyname'
|
|
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
attrs
|
|
|
|
sortedcontainers
|
|
|
|
async_generator
|
|
|
|
idna
|
|
|
|
outcome
|
2018-09-08 00:02:55 +01:00
|
|
|
sniffio
|
2018-05-08 23:19:48 +01:00
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [ contextvars ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "An async/await-native I/O library for humans and snake people";
|
|
|
|
homepage = https://github.com/python-trio/trio;
|
|
|
|
license = with lib.licenses; [ mit asl20 ];
|
|
|
|
maintainers = with lib.maintainers; [ catern ];
|
|
|
|
};
|
|
|
|
}
|