nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 107 lines 2.4 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, pytestCheckHook 5, db-dtypes 6, freezegun 7, google-cloud-bigquery-storage 8, google-cloud-core 9, google-cloud-datacatalog 10, google-cloud-storage 11, google-cloud-testutils 12, google-resumable-media 13, ipython 14, mock 15, pandas 16, proto-plus 17, psutil 18, pyarrow 19, pytest-xdist 20}: 21 22buildPythonPackage rec { 23 pname = "google-cloud-bigquery"; 24 version = "3.1.0"; 25 format = "setuptools"; 26 27 src = fetchPypi { 28 inherit pname version; 29 sha256 = "sha256-0tbK940cEz5//ZsLfi198fmy9wPeN3SXuW2adM/o7AI="; 30 }; 31 32 postPatch = '' 33 substituteInPlace setup.py \ 34 --replace 'pyarrow >= 3.0.0, < 8.0dev' 'pyarrow >= 3.0.0, < 9.0dev' 35 ''; 36 37 propagatedBuildInputs = [ 38 google-cloud-core 39 google-cloud-bigquery-storage 40 google-resumable-media 41 proto-plus 42 pyarrow 43 ]; 44 45 checkInputs = [ 46 db-dtypes 47 freezegun 48 google-cloud-testutils 49 ipython 50 mock 51 pandas 52 psutil 53 google-cloud-datacatalog 54 google-cloud-storage 55 pytestCheckHook 56 pytest-xdist 57 ]; 58 59 # prevent google directory from shadowing google imports 60 preCheck = '' 61 rm -r google 62 ''; 63 64 disabledTests = [ 65 # requires credentials 66 "test_bigquery_magic" 67 "TestBigQuery" 68 "test_context_with_no_query_cache_from_context" 69 "test_arrow_extension_types_same_for_storage_and_REST_APIs_894" 70 "test_list_rows_empty_table" 71 "test_list_rows_page_size" 72 "test_list_rows_scalars" 73 "test_list_rows_scalars_extreme" 74 "test_dry_run" 75 "test_session" 76 # Mocking of _ensure_bqstorage_client fails 77 "test_to_arrow_ensure_bqstorage_client_wo_bqstorage" 78 # requires network 79 "test_dbapi_create_view" 80 "test_list_rows_nullable_scalars_dtypes" 81 "test_parameterized_types_round_trip" 82 "test_structs" 83 "test_table_snapshots" 84 "test__initiate_resumable_upload" 85 "test__initiate_resumable_upload_mtls" 86 "test__initiate_resumable_upload_with_retry" 87 ]; 88 89 disabledTestPaths = [ 90 # requires credentials 91 "tests/system/test_query.py" 92 "tests/system/test_job_retry.py" 93 "tests/system/test_pandas.py" 94 ]; 95 96 pythonImportsCheck = [ 97 "google.cloud.bigquery" 98 "google.cloud.bigquery_v2" 99 ]; 100 101 meta = with lib; { 102 description = "Google BigQuery API client library"; 103 homepage = "https://github.com/googleapis/python-bigquery"; 104 license = licenses.asl20; 105 maintainers = with maintainers; [ SuperSandro2000 ]; 106 }; 107}