Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / sanic-testing / default.nix
blob8ebdeef2c86f7192a20cdc03c7d298444e3a64fb
1 { lib
2 , buildPythonPackage
3 , callPackage
4 , fetchFromGitHub
5 , httpx
6 , pythonOlder
7 , sanic
8 , websockets
9 }:
11 buildPythonPackage rec {
12   pname = "sanic-testing";
13   version = "23.6.0";
14   format = "setuptools";
16   disabled = pythonOlder "3.7";
18   src = fetchFromGitHub {
19     owner = "sanic-org";
20     repo = "sanic-testing";
21     rev = "refs/tags/v${version}";
22     hash = "sha256-WDiEuve9P9fLHxpK0UjxhbZUmWXtP+DV7e6OT19TASs=";
23   };
25   outputs = [
26     "out"
27     "testsout"
28   ];
30   propagatedBuildInputs = [
31     httpx
32     sanic
33     websockets
34   ];
36   postInstall = ''
37     mkdir $testsout
38     cp -R tests $testsout/tests
39   '';
41   # Check in passthru.tests.pytest to escape infinite recursion with sanic
42   doCheck = false;
44   doInstallCheck = false;
46   passthru.tests = {
47     pytest = callPackage ./tests.nix { };
48   };
50   meta = with lib; {
51     description = "Core testing clients for the Sanic web framework";
52     homepage = "https://github.com/sanic-org/sanic-testing";
53     changelog = "https://github.com/sanic-org/sanic-testing/releases/tag/v${version}";
54     license = licenses.mit;
55     maintainers = with maintainers; [ AluisioASG ];
56   };