diff --git a/pkgs/development/python-modules/folium/default.nix b/pkgs/development/python-modules/folium/default.nix index ff8c097d6ff3..48b98a8e1018 100644 --- a/pkgs/development/python-modules/folium/default.nix +++ b/pkgs/development/python-modules/folium/default.nix @@ -1,37 +1,60 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , pythonOlder -, pytest -, numpy -, nbconvert -, pandas -, mock -, jinja2 +, pytestCheckHook , branca +, jinja2 +, nbconvert +, numpy +, pandas +, pillow , requests +, selenium +, setuptools-scm }: buildPythonPackage rec { pname = "folium"; version = "0.12.1.post1"; - src = fetchPypi { - inherit pname version; - sha256 = "e91e57d8298f3ccf4cce3c5e065bea6eb17033e3c5432b8a22214009c266b2ab"; - }; - disabled = pythonOlder "3.5"; - checkInputs = [ pytest nbconvert pandas mock ]; - propagatedBuildInputs = [ jinja2 branca requests numpy ]; + src = fetchFromGitHub { + owner = "python-visualization"; + repo = "folium"; + rev = "v${version}"; + sha256 = "sha256-4UseN/3ojZdDUopwZLpHZEBon1qDDvCWfdzxodi/BeA="; + }; - # No tests in archive - doCheck = false; + SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}"; - checkPhase = '' - py.test - ''; + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + branca + jinja2 + numpy + requests + ]; + + checkInputs = [ + nbconvert + pytestCheckHook + pandas + pillow + selenium + ]; + + disabledTests = [ + # requires internet connection + "test_geojson" + "test_heat_map_with_weights" + "test_json_request" + "test_notebook" + ]; meta = { description = "Make beautiful maps with Leaflet.js & Python";