depot/third_party/nixpkgs/pkgs/development/python-modules/httpx-socks/default.nix
Default email 3a4df29a92 Project import generated by Copybara.
GitOrigin-RevId: 3d7435c638baffaa826b85459df0fff47f12317d
2022-06-16 19:23:12 +02:00

72 lines
1.2 KiB
Nix

{ lib
, async-timeout
, buildPythonPackage
, curio
, fetchFromGitHub
, flask
, httpcore
, httpx
, hypercorn
, pytest-asyncio
, pytest-trio
, pytestCheckHook
, python-socks
, pythonOlder
, sniffio
, starlette
, trio
, yarl
}:
buildPythonPackage rec {
pname = "httpx-socks";
version = "0.7.4";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "romis2012";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-+eWGmCHkXQA+JaEgofqUeFyGyMxSctal+jsqsShFM58=";
};
propagatedBuildInputs = [
httpx
httpcore
python-socks
];
passthru.optional-dependencies = {
asyncio = [ async-timeout ];
trio = [ trio ];
};
checkInputs = [
flask
hypercorn
pytest-asyncio
pytest-trio
pytestCheckHook
starlette
yarl
];
pythonImportsCheck = [
"httpx_socks"
];
disabledTests = [
# Tests don't work in the sandbox
"test_proxy"
"test_secure_proxy"
];
meta = with lib; {
description = "Proxy (HTTP, SOCKS) transports for httpx";
homepage = "https://github.com/romis2012/httpx-socks";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}