depot/third_party/nixpkgs/pkgs/development/python-modules/sanic-testing/default.nix
Default email 6d4aeb4377 Project import generated by Copybara.
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
2023-01-11 08:51:40 +01:00

57 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, callPackage
, fetchFromGitHub
, httpx
, pythonOlder
, sanic
, websockets
}:
buildPythonPackage rec {
pname = "sanic-testing";
version = "22.12.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "sanic-org";
repo = "sanic-testing";
rev = "refs/tags/v${version}";
hash = "sha256-pFTF2SQ9giRzPhG24FLqLPJRXaFdQ7Xi5EeltS7J3DI=";
};
outputs = [
"out"
"testsout"
];
propagatedBuildInputs = [
httpx
sanic
websockets
];
postInstall = ''
mkdir $testsout
cp -R tests $testsout/tests
'';
# Check in passthru.tests.pytest to escape infinite recursion with sanic
doCheck = false;
doInstallCheck = false;
passthru.tests = {
pytest = callPackage ./tests.nix { };
};
meta = with lib; {
description = "Core testing clients for the Sanic web framework";
homepage = "https://github.com/sanic-org/sanic-testing";
changelog = "https://github.com/sanic-org/sanic-testing/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ AluisioASG ];
};
}