2017-05-02 21:11:31 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchurl, isPy3k, isPy33,
|
|
|
|
unittest2, mock, pytest, trollius, asyncio,
|
|
|
|
pytest-asyncio, futures,
|
|
|
|
six, twisted, txaio, zope_interface
|
2017-04-26 13:30:04 +01:00
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
pname = "autobahn";
|
2018-04-04 19:01:41 +01:00
|
|
|
version = "18.3.1";
|
2017-04-26 13:30:04 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://pypi/a/${pname}/${name}.tar.gz";
|
2018-04-04 19:01:41 +01:00
|
|
|
sha256 = "fc1d38227bb44a453b54cffa48de8b2e6ce48ddc5e97fb5950b0faa27576f385";
|
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;
|
|
|
|
buildInputs = stdenv.lib.optionals isPy3k [ unittest2 mock pytest pytest-asyncio ];
|
|
|
|
propagatedBuildInputs = [ six twisted zope_interface txaio ] ++
|
|
|
|
(stdenv.lib.optional isPy33 asyncio) ++
|
|
|
|
(stdenv.lib.optionals (!isPy3k) [ trollius futures ]);
|
2017-04-26 13:30:04 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|