2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
db-dtypes,
|
|
|
|
fetchPypi,
|
|
|
|
freezegun,
|
|
|
|
google-api-core,
|
|
|
|
google-cloud-bigquery-storage,
|
|
|
|
google-cloud-core,
|
|
|
|
google-cloud-datacatalog,
|
|
|
|
google-cloud-storage,
|
|
|
|
google-cloud-testutils,
|
|
|
|
google-resumable-media,
|
|
|
|
grpcio,
|
|
|
|
ipython,
|
|
|
|
mock,
|
|
|
|
pandas,
|
|
|
|
proto-plus,
|
|
|
|
protobuf,
|
|
|
|
psutil,
|
|
|
|
pyarrow,
|
|
|
|
pytest-xdist,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-dateutil,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
setuptools,
|
|
|
|
tqdm,
|
2021-01-09 10:05:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-cloud-bigquery";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "3.23.1";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-S0WX+SkbQhAslmfTtFKPgB1MjyTvKxLdHsuIEnMzCVU=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2023-01-11 07:51:40 +00:00
|
|
|
grpcio
|
|
|
|
google-api-core
|
2021-01-09 10:05:03 +00:00
|
|
|
google-cloud-core
|
2022-04-27 09:35:20 +00:00
|
|
|
google-cloud-bigquery-storage
|
|
|
|
google-resumable-media
|
2021-01-09 10:05:03 +00:00
|
|
|
proto-plus
|
2023-01-11 07:51:40 +00:00
|
|
|
protobuf
|
|
|
|
requests
|
|
|
|
python-dateutil
|
|
|
|
] ++ google-api-core.optional-dependencies.grpc;
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
bqstorage = [
|
|
|
|
google-cloud-bigquery-storage
|
|
|
|
grpcio
|
|
|
|
pyarrow
|
|
|
|
];
|
|
|
|
pandas = [
|
|
|
|
db-dtypes
|
|
|
|
pandas
|
|
|
|
pyarrow
|
|
|
|
];
|
2024-04-21 15:54:59 +00:00
|
|
|
tqdm = [ tqdm ];
|
|
|
|
ipython = [ ipython ];
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-01-09 10:05:03 +00:00
|
|
|
freezegun
|
|
|
|
google-cloud-testutils
|
|
|
|
mock
|
2021-02-05 17:12:51 +00:00
|
|
|
psutil
|
2021-08-18 13:19:15 +00:00
|
|
|
google-cloud-datacatalog
|
2021-02-05 17:12:51 +00:00
|
|
|
google-cloud-storage
|
2021-01-09 10:05:03 +00:00
|
|
|
pytestCheckHook
|
2022-05-18 14:49:53 +00:00
|
|
|
pytest-xdist
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ passthru.optional-dependencies.pandas ++ passthru.optional-dependencies.ipython;
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
# prevent google directory from shadowing google imports
|
|
|
|
preCheck = ''
|
|
|
|
rm -r google
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
disabledTests = [
|
|
|
|
# requires credentials
|
|
|
|
"test_bigquery_magic"
|
|
|
|
"TestBigQuery"
|
2022-04-27 09:35:20 +00:00
|
|
|
"test_context_with_no_query_cache_from_context"
|
2021-10-14 00:43:12 +00:00
|
|
|
"test_arrow_extension_types_same_for_storage_and_REST_APIs_894"
|
2021-08-27 14:25:00 +00:00
|
|
|
"test_list_rows_empty_table"
|
|
|
|
"test_list_rows_page_size"
|
2024-05-15 15:35:15 +00:00
|
|
|
"test_list_rows_range_csv"
|
|
|
|
"test_list_rows_range"
|
2021-08-27 14:25:00 +00:00
|
|
|
"test_list_rows_scalars_extreme"
|
2024-05-15 15:35:15 +00:00
|
|
|
"test_list_rows_scalars"
|
2021-12-26 17:43:05 +00:00
|
|
|
"test_dry_run"
|
|
|
|
"test_session"
|
2021-06-28 23:13:55 +00:00
|
|
|
# Mocking of _ensure_bqstorage_client fails
|
|
|
|
"test_to_arrow_ensure_bqstorage_client_wo_bqstorage"
|
2021-08-18 13:19:15 +00:00
|
|
|
# requires network
|
|
|
|
"test_dbapi_create_view"
|
|
|
|
"test_list_rows_nullable_scalars_dtypes"
|
|
|
|
"test_parameterized_types_round_trip"
|
|
|
|
"test_structs"
|
|
|
|
"test_table_snapshots"
|
2022-03-30 09:31:56 +00:00
|
|
|
"test__initiate_resumable_upload"
|
|
|
|
"test__initiate_resumable_upload_mtls"
|
|
|
|
"test__initiate_resumable_upload_with_retry"
|
2022-08-12 12:06:08 +00:00
|
|
|
"test_table_clones"
|
2023-01-11 07:51:40 +00:00
|
|
|
"test_context_with_default_connection"
|
|
|
|
"test_context_with_custom_connection"
|
2021-02-05 17:12:51 +00:00
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabledTestPaths = [
|
2023-01-11 07:51:40 +00:00
|
|
|
# Tests require credentials
|
2022-04-27 09:35:20 +00:00
|
|
|
"tests/system/test_query.py"
|
|
|
|
"tests/system/test_job_retry.py"
|
|
|
|
"tests/system/test_pandas.py"
|
|
|
|
];
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"google.cloud.bigquery"
|
|
|
|
"google.cloud.bigquery_v2"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-01-09 10:05:03 +00:00
|
|
|
description = "Google BigQuery API client library";
|
|
|
|
homepage = "https://github.com/googleapis/python-bigquery";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/googleapis/python-bigquery/blob/v${version}/CHANGELOG.md";
|
2021-01-09 10:05:03 +00:00
|
|
|
license = licenses.asl20;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
}
|