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