python310Packages.daphne: 3.0.2 -> 4.0.0

This commit is contained in:
Fabian Affolter 2022-10-21 10:52:14 +02:00
parent 229f6d1487
commit 5804c8cde2

View file

@ -1,35 +1,60 @@
{ lib, stdenv, buildPythonPackage, isPy3k, fetchFromGitHub { lib
, asgiref, autobahn, twisted, pytest-runner , stdenv
, hypothesis, pytest, pytest-asyncio, service-identity, pyopenssl , asgiref
, autobahn
, buildPythonPackage
, django
, fetchFromGitHub
, hypothesis
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, twisted
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "daphne"; pname = "daphne";
version = "3.0.2"; version = "4.0.0";
format = "setuptools";
disabled = !isPy3k; disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "django"; owner = "django";
repo = pname; repo = pname;
rev = version; 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 ]; postPatch = ''
substituteInPlace setup.py \
doCheck = !stdenv.isDarwin; # most tests fail on darwin --replace "pytest-runner" ""
checkPhase = ''
py.test
''; '';
# Most tests fail on darwin
doCheck = !stdenv.isDarwin;
pythonImportsCheck = [
"daphne"
];
meta = with lib; { meta = with lib; {
description = "Django ASGI (HTTP/WebSocket) server"; description = "Django ASGI (HTTP/WebSocket) server";
license = licenses.bsd3;
homepage = "https://github.com/django/daphne"; homepage = "https://github.com/django/daphne";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
}; };
} }