1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7
8 geopandas,
9 libpysal,
10 matplotlib,
11 networkx,
12 numpy,
13 pandas,
14 scikit-learn,
15 scipy,
16 setuptools-scm,
17}:
18
19buildPythonPackage rec {
20 pname = "mapclassify";
21 version = "2.8.1";
22 pyproject = true;
23 disabled = pythonOlder "3.9";
24
25 src = fetchFromGitHub {
26 owner = "pysal";
27 repo = "mapclassify";
28 rev = "refs/tags/v${version}";
29 hash = "sha256-VClkMOR8P9sX3slVjJ2xYYLVnvZuOgVYZiCGrBxoZEc=";
30 };
31
32 build-system = [ setuptools-scm ];
33
34 propagatedBuildInputs = [
35 networkx
36 numpy
37 pandas
38 scikit-learn
39 scipy
40 ];
41
42 nativeCheckInputs = [
43 pytestCheckHook
44 geopandas
45 libpysal
46 matplotlib
47 ];
48
49 # requires network access
50 disabledTestPaths = [
51 "mapclassify/tests/test_greedy.py"
52 "mapclassify/tests/test_rgba.py"
53 ];
54
55 pythonImportsCheck = [ "mapclassify" ];
56
57 meta = {
58 description = "Classification Schemes for Choropleth Maps";
59 homepage = "https://pysal.org/mapclassify/";
60 changelog = "https://github.com/pysal/mapclassify/releases/tag/v${version}";
61 license = lib.licenses.bsd3;
62 maintainers = lib.teams.geospatial.members;
63 };
64}