From f56a759f139437ca6c0fae316e624e3d8e5d4085 Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Tue, 28 Jan 2020 17:43:15 -0500 Subject: [PATCH] pythonPackages.pproxy: init at 2.3.2 Tunnels among remote servers using regex rules. Requirement for pythonPackages.qiskit-ibmq-provider. --- .../python-modules/pproxy/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/pproxy/default.nix diff --git a/pkgs/development/python-modules/pproxy/default.nix b/pkgs/development/python-modules/pproxy/default.nix new file mode 100644 index 000000000000..9f97d7df1356 --- /dev/null +++ b/pkgs/development/python-modules/pproxy/default.nix @@ -0,0 +1,45 @@ +{ lib +, isPy27 +, buildPythonPackage +, fetchFromGitHub +, pycryptodome +, uvloop +}: + +buildPythonPackage rec { + pname = "pproxy"; + version = "2.3.2"; + + disabled = isPy27; + + # doesn't use tagged releases. Tests not in PyPi versioned releases + src = fetchFromGitHub { + owner = "qwj"; + repo = "python-proxy"; + rev = "818ab9cc10565789fe429a7be50ddefb9c583781"; + sha256 = "0g3cyi5lzakhs5p3fpwywbl8jpapnr8890zw9w45dqg8k0svc1fi"; + }; + + propagatedBuildInputs = [ + pycryptodome + uvloop + ]; + + pythonImportsCheck = [ "pproxy" ]; + disabledTests = [ "api_server" "api_client" ]; # try to connect to outside Internet, so disabled + # test suite doesn't use test runner. so need to run ``python ./tests/*`` + checkPhase = '' + shopt -s extglob + for f in ./tests/!(${builtins.concatStringsSep "|" disabledTests}).py ; do + echo "***Testing $f***" + eval "python $f" + done + ''; + + meta = with lib; { + description = "Proxy server that can tunnel among remote servers by regex rules"; + homepage = "https://github.com/qwj/python-proxy"; + license = licenses.mit; + maintainers = with maintainers; [ drewrisinger ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6e78084edaa2..f23f961e241f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4914,6 +4914,8 @@ in { ppft = callPackage ../development/python-modules/ppft { }; + pproxy = callPackage ../development/python-modules/pproxy { }; + praw = if isPy3k then callPackage ../development/python-modules/praw { } else callPackage ../development/python-modules/praw/6.3.nix { };