python310Packages.daphne: 3.0.2 -> 4.0.0
This commit is contained in:
parent
229f6d1487
commit
5804c8cde2
1 changed files with 40 additions and 15 deletions
|
@ -1,35 +1,60 @@
|
|||
{ lib, stdenv, buildPythonPackage, isPy3k, fetchFromGitHub
|
||||
, asgiref, autobahn, twisted, pytest-runner
|
||||
, hypothesis, pytest, pytest-asyncio, service-identity, pyopenssl
|
||||
{ lib
|
||||
, stdenv
|
||||
, asgiref
|
||||
, autobahn
|
||||
, buildPythonPackage
|
||||
, django
|
||||
, fetchFromGitHub
|
||||
, hypothesis
|
||||
, pytest-asyncio
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, twisted
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "daphne";
|
||||
version = "3.0.2";
|
||||
version = "4.0.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = !isPy3k;
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "django";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-KWkMV4L7bA2Eo/u4GGif6lmDNrZAzvYyDiyzyWt9LeI=";
|
||||
hash = "sha256-vPMrmC2B0Pcvk8Y1FsJ4PXnzIMtPod7lL2u0IYNVUxc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pytest-runner ];
|
||||
propagatedBuildInputs = [
|
||||
asgiref
|
||||
autobahn
|
||||
twisted
|
||||
] ++ twisted.optional-dependencies.tls;
|
||||
|
||||
propagatedBuildInputs = [ asgiref autobahn twisted service-identity pyopenssl ];
|
||||
checkInputs = [
|
||||
django
|
||||
hypothesis
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
checkInputs = [ hypothesis pytest pytest-asyncio ];
|
||||
|
||||
doCheck = !stdenv.isDarwin; # most tests fail on darwin
|
||||
|
||||
checkPhase = ''
|
||||
py.test
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "pytest-runner" ""
|
||||
'';
|
||||
|
||||
# Most tests fail on darwin
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"daphne"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Django ASGI (HTTP/WebSocket) server";
|
||||
license = licenses.bsd3;
|
||||
homepage = "https://github.com/django/daphne";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue