nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 branca,
5 fetchFromGitHub,
6 geodatasets,
7 geopandas,
8 jinja2,
9 nbconvert,
10 numpy,
11 pandas,
12 pillow,
13 pixelmatch,
14 pytestCheckHook,
15 requests,
16 selenium,
17 setuptools,
18 setuptools-scm,
19 xyzservices,
20}:
21
22buildPythonPackage rec {
23 pname = "folium";
24 version = "0.20.0";
25 pyproject = true;
26
27 src = fetchFromGitHub {
28 owner = "python-visualization";
29 repo = "folium";
30 tag = "v${version}";
31 hash = "sha256-yLF4TdrMVEtWvGXZGbwa3OxCkdXMsN4m45rPrGDHlCU=";
32 };
33
34 build-system = [
35 setuptools
36 setuptools-scm
37 ];
38
39 dependencies = [
40 branca
41 jinja2
42 numpy
43 requests
44 xyzservices
45 ];
46
47 nativeCheckInputs = [
48 geodatasets
49 geopandas
50 nbconvert
51 pandas
52 pillow
53 pixelmatch
54 pytestCheckHook
55 selenium
56 ];
57
58 disabledTests = [
59 # Tests require internet connection
60 "test_json_request"
61 # no selenium driver
62 "test__repr_png_is_bytes"
63 "test_valid_png_size"
64 "test_valid_png"
65 # pooch tries to write somewhere it can, and geodatasets does not give us an env var to customize this.
66 "test_timedynamic_geo_json"
67 ];
68
69 disabledTestPaths = [
70 # Selenium cannot find chrome driver, even with chromedriver package
71 "tests/snapshots/test_snapshots.py"
72 "tests/selenium"
73 ];
74
75 pythonImportsCheck = [ "folium" ];
76
77 meta = {
78 description = "Make beautiful maps with Leaflet.js & Python";
79 homepage = "https://github.com/python-visualization/folium";
80 changelog = "https://github.com/python-visualization/folium/releases/tag/${src.tag}";
81 license = with lib.licenses; [ mit ];
82 teams = [ lib.teams.geospatial ];
83 };
84}