2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, dateutil
|
2021-03-23 19:22:30 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, mock
|
|
|
|
, msgpack
|
|
|
|
, nose
|
|
|
|
, pandas
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytz
|
2021-03-23 19:22:30 +00:00
|
|
|
, requests
|
|
|
|
, requests-mock
|
2020-04-24 23:36:52 +00:00
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "influxdb";
|
2020-06-15 15:56:04 +00:00
|
|
|
version = "5.3.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "influxdata";
|
|
|
|
repo = "influxdb-python";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1jfkf53jcf8lcq98qc0bw5d1d0yp3558mh8l2dqc9jlsm0smigjs";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
dateutil
|
|
|
|
pytz
|
|
|
|
six
|
|
|
|
msgpack
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
|
|
|
mock
|
|
|
|
nose
|
|
|
|
pandas
|
|
|
|
];
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2021-03-23 19:22:30 +00:00
|
|
|
# Relaxes msgpack pinning
|
2020-06-15 15:56:04 +00:00
|
|
|
url = "https://github.com/influxdata/influxdb-python/commit/cc41e290f690c4eb67f75c98fa9f027bdb6eb16b.patch";
|
|
|
|
sha256 = "1fb9qrq1kp24pixjwvzhdy67z3h0wnj92aj0jw0a25fd0rdxdvg4";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests cause FutureWarning due to use of 'record' instead of 'records' in pandas.
|
|
|
|
# https://github.com/influxdata/influxdb-python/pull/845
|
|
|
|
# Also type mismatches in assertEqual on DataFrame:
|
|
|
|
# b'foo[30 chars]_one=1.0,column_two=1.0 0\nfoo,tag_one=red,tag[47 chars]00\n' !=
|
|
|
|
# b'foo[30 chars]_one="1",column_two=1i 0\nfoo,tag_one=red,tag_[46 chars]00\n'
|
|
|
|
"test_write_points_from_dataframe_with_nan_json"
|
|
|
|
"test_write_points_from_dataframe_with_tags_and_nan_json"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "influxdb" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python client for InfluxDB";
|
|
|
|
homepage = "https://github.com/influxdb/influxdb-python";
|
|
|
|
license = licenses.mit;
|
2021-03-23 19:22:30 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|