From bd91d4fb489a92b170041d0b1bd3cfcc6551bf6d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 27 Feb 2021 10:48:47 +0100 Subject: [PATCH 1/2] python3Packages.simplekml: update meta --- .../python-modules/simplekml/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/simplekml/default.nix b/pkgs/development/python-modules/simplekml/default.nix index 6b8bac25b87..42e93d63fae 100644 --- a/pkgs/development/python-modules/simplekml/default.nix +++ b/pkgs/development/python-modules/simplekml/default.nix @@ -1,4 +1,7 @@ -{ lib , buildPythonPackage , fetchPypi }: +{ lib +, buildPythonPackage +, fetchPypi +}: buildPythonPackage rec { pname = "simplekml"; @@ -9,11 +12,13 @@ buildPythonPackage rec { sha256 = "17h48r1dsfz4g9xcxh1xq85h20hiz7qzzymc1gla96bj2wh4wyv5"; }; - doCheck = false; # no tests are defined in 1.3.5 + # no tests are defined in 1.3.5 + doCheck = false; + pythonImportsCheck = [ "simplekml" ]; meta = with lib; { - description = "Generate KML with as little effort as possible"; - homepage = "https://readthedocs.org/projects/simplekml/"; + description = "Python package to generate KML"; + homepage = "https://simplekml.readthedocs.io/"; license = licenses.lgpl3Plus; maintainers = with maintainers; [ rvolosatovs ]; }; From b4e58d9832c2dc54f76b6c2538cf2ea71bc8f91a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 27 Feb 2021 11:17:20 +0100 Subject: [PATCH 2/2] python3Packages.influxdb: enable tests --- .../python-modules/influxdb/default.nix | 50 ++++++++++++++----- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/influxdb/default.nix b/pkgs/development/python-modules/influxdb/default.nix index 69fe83b8779..5a2da075646 100644 --- a/pkgs/development/python-modules/influxdb/default.nix +++ b/pkgs/development/python-modules/influxdb/default.nix @@ -1,23 +1,46 @@ { lib , buildPythonPackage -, fetchPypi -, requests , dateutil -, pytz -, six -, msgpack +, fetchFromGitHub , fetchpatch +, mock +, msgpack +, nose +, pandas +, pytestCheckHook +, pytz +, requests +, requests-mock +, six }: buildPythonPackage rec { pname = "influxdb"; version = "5.3.0"; - src = fetchPypi { - inherit pname version; - sha256 = "9bcaafd57ac152b9824ab12ed19f204206ef5df8af68404770554c5b55b475f6"; + src = fetchFromGitHub { + owner = "influxdata"; + repo = "influxdb-python"; + rev = "v${version}"; + sha256 = "1jfkf53jcf8lcq98qc0bw5d1d0yp3558mh8l2dqc9jlsm0smigjs"; }; + propagatedBuildInputs = [ + requests + dateutil + pytz + six + msgpack + ]; + + checkInputs = [ + pytestCheckHook + requests-mock + mock + nose + pandas + ]; + patches = [ (fetchpatch { url = "https://github.com/influxdata/influxdb-python/commit/cc41e290f690c4eb67f75c98fa9f027bdb6eb16b.patch"; @@ -25,14 +48,17 @@ buildPythonPackage rec { }) ]; - # ImportError: No module named tests - doCheck = false; - propagatedBuildInputs = [ requests dateutil pytz six msgpack ]; + disabledTests = [ + # Disable failing test + "test_write_points_from_dataframe_with_tags_and_nan_json" + ]; + + pythonImportsCheck = [ "influxdb" ]; meta = with lib; { description = "Python client for InfluxDB"; homepage = "https://github.com/influxdb/influxdb-python"; license = licenses.mit; + maintainers = with maintainers; [ fab ]; }; - }