2018-11-02 18:49:46 +00:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-03-18 22:07:55 +00:00
|
|
|
, freezegun
|
2018-11-02 18:49:46 +00:00
|
|
|
, google_resumable_media
|
|
|
|
, google_api_core
|
|
|
|
, google_cloud_core
|
|
|
|
, pandas
|
|
|
|
, pyarrow
|
|
|
|
, pytest
|
|
|
|
, mock
|
|
|
|
, ipython
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-cloud-bigquery";
|
2020-08-16 17:31:00 +00:00
|
|
|
version = "1.26.1";
|
2018-11-02 18:49:46 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-16 17:31:00 +00:00
|
|
|
sha256 = "51c29b95d460486d9e0210f63e8193691cd08480b69775270e84dd3db87c1bf2";
|
2018-11-02 18:49:46 +00:00
|
|
|
};
|
|
|
|
|
2020-03-18 22:07:55 +00:00
|
|
|
checkInputs = [ pytest mock ipython freezegun ];
|
2018-11-02 18:49:46 +00:00
|
|
|
propagatedBuildInputs = [ google_resumable_media google_api_core google_cloud_core pandas pyarrow ];
|
|
|
|
|
2020-03-18 22:07:55 +00:00
|
|
|
# prevent local directory from shadowing google imports
|
|
|
|
# call_api_applying_custom_retry_on_timeout requires credentials
|
|
|
|
# test_magics requires modifying sys.path
|
2018-11-02 18:49:46 +00:00
|
|
|
checkPhase = ''
|
2020-03-18 22:07:55 +00:00
|
|
|
rm -r google
|
|
|
|
pytest tests/unit \
|
|
|
|
-k 'not call_api_applying_custom_retry_on_timeout' \
|
|
|
|
--ignore=tests/unit/test_magics.py
|
2018-11-02 18:49:46 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Google BigQuery API client library";
|
2020-03-18 22:07:55 +00:00
|
|
|
homepage = "https://github.com/GoogleCloudPlatform/google-cloud-python";
|
2018-11-02 18:49:46 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|