nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6
7 geopandas,
8 libpysal,
9 matplotlib,
10 networkx,
11 numpy,
12 pandas,
13 scikit-learn,
14 scipy,
15 setuptools-scm,
16}:
17
18buildPythonPackage rec {
19 pname = "mapclassify";
20 version = "2.10.0";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "pysal";
25 repo = "mapclassify";
26 tag = "v${version}";
27 hash = "sha256-OQpDrxa0zRPDAdyS6KP5enb/JZwbYoXTV8kUijV3tNM=";
28 };
29
30 build-system = [ setuptools-scm ];
31
32 propagatedBuildInputs = [
33 networkx
34 numpy
35 pandas
36 scikit-learn
37 scipy
38 ];
39
40 nativeCheckInputs = [
41 pytestCheckHook
42 geopandas
43 libpysal
44 matplotlib
45 ];
46
47 # requires network access
48 disabledTestPaths = [
49 # this module does http requests *at import time*
50 "mapclassify/tests/test_greedy.py"
51 # depends on remote data
52 "mapclassify/tests/test_rgba.py"
53 ];
54
55 disabledTests = [
56 # depends on remote datasets
57 "test_legendgram_map"
58 "test_legendgram_most_recent_cmap"
59 ];
60
61 pythonImportsCheck = [ "mapclassify" ];
62
63 meta = {
64 description = "Classification Schemes for Choropleth Maps";
65 homepage = "https://pysal.org/mapclassify/";
66 changelog = "https://github.com/pysal/mapclassify/releases/tag/${src.tag}";
67 license = lib.licenses.bsd3;
68 teams = [ lib.teams.geospatial ];
69 };
70}