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