diff options
Diffstat (limited to 'pkgs/development/python-modules/folium/default.nix')
-rw-r--r-- | pkgs/development/python-modules/folium/default.nix | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/pkgs/development/python-modules/folium/default.nix b/pkgs/development/python-modules/folium/default.nix index 30a2bcf7731..09c2137872d 100644 --- a/pkgs/development/python-modules/folium/default.nix +++ b/pkgs/development/python-modules/folium/default.nix @@ -1,42 +1,36 @@ { lib +, branca , buildPythonPackage , fetchFromGitHub -, fetchpatch -, pythonOlder -, pytestCheckHook -, branca +, geopandas , jinja2 , nbconvert , numpy , pandas , pillow +, pytestCheckHook +, pythonOlder , requests , selenium , setuptools-scm +, xyzservices }: buildPythonPackage rec { pname = "folium"; version = "0.14.0"; + format = "setuptools"; - disabled = pythonOlder "3.5"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "python-visualization"; repo = "folium"; rev = "refs/tags/v${version}"; - sha256 = "sha256-zxLFj5AeTVAxE0En7ZlbBdJEm3WrcPv23MgOhyfNi14="; + hash = "sha256-zxLFj5AeTVAxE0En7ZlbBdJEm3WrcPv23MgOhyfNi14="; }; - patches = [ - # Fix test failures with latest branca - (fetchpatch { - url = "https://github.com/python-visualization/folium/commit/b410ab21cc46ec6756c2f755e5e81dcdca029c53.patch"; - hash = "sha256-SVN4wKEep+VnAKnkJTf59rhnzHnbk6dV9XL5ntv4bog="; - }) - ]; - - SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}"; + SETUPTOOLS_SCM_PRETEND_VERSION = version; nativeBuildInputs = [ setuptools-scm @@ -50,24 +44,34 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ + geopandas nbconvert - pytestCheckHook pandas pillow + pytestCheckHook selenium + xyzservices ]; disabledTests = [ - # requires internet connection + # Tests require internet connection + "test__repr_png_is_bytes" "test_geojson" "test_heat_map_with_weights" "test_json_request" "test_notebook" + "test_valid_png_size" + "test_valid_png" + ]; + + pythonImportsCheck = [ + "folium" ]; meta = { description = "Make beautiful maps with Leaflet.js & Python"; homepage = "https://github.com/python-visualization/folium"; + changelog = "https://github.com/python-visualization/folium/blob/v${version}/CHANGES.txt"; license = with lib.licenses; [ mit ]; maintainers = with lib.maintainers; [ fridh ]; }; |