Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pproxy / default.nix
bloba7028757b0ba782226a7ff871f389cc34abb1445
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pycryptodome
5 , uvloop
6 , setuptools
7 , pythonOlder
8 }:
10 buildPythonPackage rec {
11   pname = "pproxy";
12   version = "2.7.9";
13   pyproject = true;
15   disabled = pythonOlder "3.6";
17   src = fetchFromGitHub {
18     owner = "qwj";
19     repo = "python-proxy";
20     rev = "7fccf8dd62204f34b0aa3a70fc568fd6ddff7728";
21     sha256 = "sha256-bOqDdNiaZ5MRi/UeF0hJwMs+rfQBKRsTmXrZ6ieIguo=";
22   };
24   nativeBuildInputs = [
25     setuptools
26   ];
28   propagatedBuildInputs = [
29     pycryptodome
30     uvloop
31   ];
33   pythonImportsCheck = [
34     "pproxy"
35   ];
37   disabledTests = [
38     # Tests try to connect to outside Internet, so disabled
39     "api_server"
40     "api_client"
41   ];
43   # test suite doesn't use test runner. so need to run ``python ./tests/*``
44   checkPhase = ''
45     shopt -s extglob
46     for f in ./tests/!(${builtins.concatStringsSep "|" disabledTests}).py ; do
47       echo "***Testing $f***"
48       eval "python $f"
49     done
50   '';
52   meta = with lib; {
53     description = "Proxy server that can tunnel among remote servers by regex rules";
54     mainProgram = "pproxy";
55     homepage = "https://github.com/qwj/python-proxy";
56     license = licenses.mit;
57     maintainers = with maintainers; [ drewrisinger ];
58   };