2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-01-09 10:05:03 +00:00
|
|
|
, buildPythonPackage
|
2022-04-27 09:35:20 +00:00
|
|
|
, db-dtypes
|
2023-01-11 07:51:40 +00:00
|
|
|
, fetchPypi
|
2021-01-09 10:05:03 +00:00
|
|
|
, freezegun
|
2023-01-11 07:51:40 +00:00
|
|
|
, google-api-core
|
2022-04-27 09:35:20 +00:00
|
|
|
, google-cloud-bigquery-storage
|
2021-01-09 10:05:03 +00:00
|
|
|
, google-cloud-core
|
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
|
|
|
, google-cloud-testutils
|
|
|
|
, google-resumable-media
|
2023-01-11 07:51:40 +00:00
|
|
|
, grpcio
|
2021-01-09 10:05:03 +00:00
|
|
|
, ipython
|
|
|
|
, mock
|
|
|
|
, pandas
|
|
|
|
, proto-plus
|
2023-01-11 07:51:40 +00:00
|
|
|
, protobuf
|
2021-02-05 17:12:51 +00:00
|
|
|
, psutil
|
2021-01-09 10:05:03 +00:00
|
|
|
, pyarrow
|
2022-05-18 14:49:53 +00:00
|
|
|
, pytest-xdist
|
2023-01-11 07:51:40 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, python-dateutil
|
2022-08-21 13:32:41 +00:00
|
|
|
, pythonOlder
|
2023-01-11 07:51:40 +00:00
|
|
|
, requests
|
|
|
|
, tqdm
|
2021-01-09 10:05:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-cloud-bigquery";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "3.11.3";
|
2021-12-26 17:43:05 +00:00
|
|
|
format = "setuptools";
|
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;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-1Fhb6edsmE7IPvKQ6+/xdWLSyfL0+E0wFdm3sntJmp0=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
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
|
|
|
|
];
|
|
|
|
tqdm = [
|
|
|
|
tqdm
|
|
|
|
];
|
|
|
|
ipython = [
|
|
|
|
ipython
|
|
|
|
];
|
|
|
|
};
|
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
|
2023-01-11 07:51:40 +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"
|
|
|
|
"test_list_rows_scalars"
|
|
|
|
"test_list_rows_scalars_extreme"
|
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;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|