2018-06-23 14:27:58 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, isPy3k, isPy33,
|
2017-05-02 21:11:31 +01:00
|
|
|
unittest2, mock, pytest, trollius, asyncio,
|
2018-08-25 06:42:44 +01:00
|
|
|
pytest-asyncio, futures, cffi,
|
2017-05-02 21:11:31 +01:00
|
|
|
six, twisted, txaio, zope_interface
|
2017-04-26 13:30:04 +01:00
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "autobahn";
|
2018-08-25 06:42:44 +01:00
|
|
|
version = "18.8.1";
|
2017-04-26 13:30:04 +01:00
|
|
|
|
2018-06-23 14:27:58 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-08-25 06:42:44 +01:00
|
|
|
sha256 = "b69858e0be4bff8437b0bd82a0db1cbef7405e16bd9354ba587c043d6d5e1ad9";
|
2017-04-26 13:30:04 +01:00
|
|
|
};
|
|
|
|
|
2017-05-02 21:11:31 +01:00
|
|
|
# Upstream claim python2 support, but tests require pytest-asyncio which
|
|
|
|
# is pythn3 only. Therefore, tests are skipped for python2.
|
|
|
|
doCheck = isPy3k;
|
2018-08-25 06:42:44 +01:00
|
|
|
checkInputs = stdenv.lib.optionals isPy3k [ unittest2 mock pytest pytest-asyncio ];
|
|
|
|
propagatedBuildInputs = [ cffi six twisted zope_interface txaio ] ++
|
2017-05-02 21:11:31 +01:00
|
|
|
(stdenv.lib.optional isPy33 asyncio) ++
|
|
|
|
(stdenv.lib.optionals (!isPy3k) [ trollius futures ]);
|
2017-04-26 13:30:04 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
2018-06-12 17:46:58 +01:00
|
|
|
USE_TWISTED=true py.test $out
|
2017-04-26 13:30:04 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "WebSocket and WAMP in Python for Twisted and asyncio.";
|
2018-03-25 06:04:25 +01:00
|
|
|
homepage = "https://crossbar.io/autobahn";
|
2017-04-26 13:30:04 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ nand0p ];
|
|
|
|
};
|
|
|
|
}
|