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