1{
2 lib,
3 branca,
4 buildPythonPackage,
5 fetchFromGitHub,
6 geodatasets,
7 geopandas,
8 jinja2,
9 nbconvert,
10 numpy,
11 pandas,
12 pillow,
13 pytestCheckHook,
14 pythonOlder,
15 requests,
16 selenium,
17 setuptools,
18 setuptools-scm,
19 wheel,
20 xyzservices,
21}:
22
23buildPythonPackage rec {
24 pname = "folium";
25 version = "0.17.0";
26 pyproject = true;
27
28 disabled = pythonOlder "3.7";
29
30 src = fetchFromGitHub {
31 owner = "python-visualization";
32 repo = "folium";
33 rev = "refs/tags/v${version}";
34 hash = "sha256-uKT6WqT3pI3rqfV/3CA+mXBk3F7h4RWW1h2FPIy0JH4=";
35 };
36
37 nativeBuildInputs = [
38 setuptools
39 setuptools-scm
40 wheel
41 ];
42
43 propagatedBuildInputs = [
44 branca
45 jinja2
46 numpy
47 requests
48 xyzservices
49 ];
50
51 nativeCheckInputs = [
52 geodatasets
53 geopandas
54 nbconvert
55 pandas
56 pillow
57 pytestCheckHook
58 selenium
59 ];
60
61 disabledTests = [
62 # Tests require internet connection
63 "test__repr_png_is_bytes"
64 "test_geojson"
65 "test_heat_map_with_weights"
66 "test_json_request"
67 "test_notebook"
68 "test_valid_png_size"
69 "test_valid_png"
70 # pooch tries to write somewhere it can, and geodatasets does not give us an env var to customize this.
71 "test_timedynamic_geo_json"
72 ];
73
74 pythonImportsCheck = [ "folium" ];
75
76 meta = {
77 description = "Make beautiful maps with Leaflet.js & Python";
78 homepage = "https://github.com/python-visualization/folium";
79 changelog = "https://github.com/python-visualization/folium/blob/v${version}/CHANGES.txt";
80 license = with lib.licenses; [ mit ];
81 maintainers = lib.teams.geospatial.members;
82 };
83}