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 tag = "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 # Abort trap: 6
54 "mapclassify/tests/test_mapclassify.py"
55 ];
56
57 pythonImportsCheck = [ "mapclassify" ];
58
59 meta = {
60 description = "Classification Schemes for Choropleth Maps";
61 homepage = "https://pysal.org/mapclassify/";
62 changelog = "https://github.com/pysal/mapclassify/releases/tag/v${version}";
63 license = lib.licenses.bsd3;
64 teams = [ lib.teams.geospatial ];
65 };
66}