Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 setuptools, 7 click, 8 mock, 9 pytestCheckHook, 10 google-auth, 11 requests-oauthlib, 12 pythonOlder, 13}: 14 15buildPythonPackage rec { 16 pname = "google-auth-oauthlib"; 17 version = "1.2.0"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.6"; 21 22 src = fetchPypi { 23 inherit pname version; 24 hash = "sha256-KS0tN4M0nysHNKCgIHseHjIqwZPCwJ2PfGE/t8xQHqg="; 25 }; 26 27 nativeBuildInputs = [ setuptools ]; 28 29 propagatedBuildInputs = [ 30 google-auth 31 requests-oauthlib 32 ]; 33 34 passthru.optional-dependencies = { 35 tool = [ click ]; 36 }; 37 38 nativeCheckInputs = [ 39 mock 40 pytestCheckHook 41 ] ++ passthru.optional-dependencies.tool; 42 43 disabledTests = 44 [ 45 # Flaky test. See https://github.com/NixOS/nixpkgs/issues/288424#issuecomment-1941609973. 46 "test_run_local_server_occupied_port" 47 ] 48 ++ lib.optionals stdenv.isDarwin [ 49 # This test fails if the hostname is not associated with an IP (e.g., in `/etc/hosts`). 50 "test_run_local_server_bind_addr" 51 ]; 52 53 pythonImportsCheck = [ "google_auth_oauthlib" ]; 54 55 meta = with lib; { 56 changelog = "https://github.com/googleapis/google-auth-library-python-oauthlib/blob/v${version}/CHANGELOG.md"; 57 description = "Google Authentication Library: oauthlib integration"; 58 homepage = "https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib"; 59 license = licenses.asl20; 60 mainProgram = "google-oauthlib-tool"; 61 maintainers = with maintainers; [ terlar ]; 62 }; 63}