Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, aiohttp 3, buildPythonPackage 4, fetchPypi 5, google-auth 6, google-cloud-testutils 7, google-crc32c 8, mock 9, pytest-asyncio 10, pytestCheckHook 11, pythonOlder 12, requests 13}: 14 15buildPythonPackage rec { 16 pname = "google-resumable-media"; 17 version = "2.5.0"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchPypi { 23 inherit pname version; 24 hash = "sha256-IYkx6OKypzpY6zVKKI4DoP1fscRYMmGsbkwHhmZGjJM="; 25 }; 26 27 propagatedBuildInputs = [ 28 google-auth 29 google-crc32c 30 ]; 31 32 passthru.optional-dependencies = { 33 requests = [ 34 requests 35 ]; 36 aiohttp = [ 37 aiohttp 38 ]; 39 }; 40 41 nativeCheckInputs = [ 42 google-cloud-testutils 43 mock 44 pytest-asyncio 45 pytestCheckHook 46 ] ++ passthru.optional-dependencies.requests; 47 48 preCheck = '' 49 # prevent shadowing imports 50 rm -r google 51 # fixture 'authorized_transport' not found 52 rm tests/system/requests/test_upload.py 53 # requires network 54 rm tests/system/requests/test_download.py 55 ''; 56 57 pythonImportsCheck = [ 58 "google._async_resumable_media" 59 "google.resumable_media" 60 ]; 61 62 meta = with lib; { 63 description = "Utilities for Google Media Downloads and Resumable Uploads"; 64 homepage = "https://github.com/GoogleCloudPlatform/google-resumable-media-python"; 65 changelog = "https://github.com/googleapis/google-resumable-media-python/blob/v${version}/CHANGELOG.md"; 66 license = licenses.asl20; 67 maintainers = with maintainers; [ SuperSandro2000 ]; 68 }; 69}