159e378cbb
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
61 lines
1.1 KiB
Nix
61 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
callPackage,
|
|
fetchFromGitHub,
|
|
httpx,
|
|
pythonOlder,
|
|
sanic,
|
|
setuptools,
|
|
websockets,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sanic-testing";
|
|
version = "24.6.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sanic-org";
|
|
repo = "sanic-testing";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-biUgxa0sINHAYzyKimVD8+/mPUq2dlnCl2BN+UeUaEo=";
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"testsout"
|
|
];
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
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 = [ ];
|
|
};
|
|
}
|