nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 75 lines 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 cryptography, 6 fetchFromGitHub, 7 mock, 8 pyparsing, 9 pysocks, 10 pytest-cov-stub, 11 pytest-forked, 12 pytest-randomly, 13 pytest-timeout, 14 pytestCheckHook, 15 setuptools, 16 six, 17}: 18 19buildPythonPackage (finalAttrs: { 20 pname = "httplib2"; 21 version = "0.31.1"; 22 pyproject = true; 23 24 src = fetchFromGitHub { 25 owner = "httplib2"; 26 repo = "httplib2"; 27 tag = "v${finalAttrs.version}"; 28 hash = "sha256-1OO3BNtOGJxV9L34C60CHv95LLH9Ih1lY0zQUD4wrnc="; 29 }; 30 31 build-system = [ setuptools ]; 32 33 dependencies = [ pyparsing ]; 34 35 nativeCheckInputs = [ 36 cryptography 37 mock 38 pysocks 39 pytest-cov-stub 40 pytest-forked 41 pytest-randomly 42 pytest-timeout 43 six 44 pytestCheckHook 45 ]; 46 47 __darwinAllowLocalNetworking = true; 48 49 disabledTests = [ 50 # ValueError: Unable to load PEM file. 51 # https://github.com/httplib2/httplib2/issues/192#issuecomment-993165140 52 "test_client_cert_password_verified" 53 54 # improper pytest marking 55 "test_head_301" 56 "test_303" 57 ] 58 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 59 # fails with "ConnectionResetError: [Errno 54] Connection reset by peer" 60 "test_connection_close" 61 # fails with HTTP 408 Request Timeout, instead of expected 200 OK 62 "test_timeout_subsequent" 63 "test_connection_close" 64 ]; 65 66 pythonImportsCheck = [ "httplib2" ]; 67 68 meta = { 69 changelog = "https://github.com/httplib2/httplib2/blob/${finalAttrs.src.tag}/CHANGELOG"; 70 description = "Comprehensive HTTP client library"; 71 homepage = "https://github.com/httplib2/httplib2"; 72 license = lib.licenses.mit; 73 maintainers = with lib.maintainers; [ fab ]; 74 }; 75})