summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/osmpythontools/default.nix
blob: cdf2598369e9fd7cd0636993a231184c1f9b6d13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  beautifulsoup4,
  geojson,
  lxml,
  matplotlib,
  numpy,
  pandas,
  setuptools,
  ujson,
  xarray,
}:

buildPythonPackage rec {
  pname = "osmpythontools";
  version = "0.3.6";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "mocnik-science";
    repo = "osm-python-tools";
    tag = "v${version}";
    hash = "sha256-ajZJSuMbku08vHvn4fqsLqCS/E2XR3uVqiH7R1GHH5o=";
  };

  build-system = [ setuptools ];

  dependencies = [
    beautifulsoup4
    geojson
    lxml
    matplotlib
    numpy
    pandas
    ujson
    xarray
  ];

  # tests touch network
  doCheck = false;

  pythonImportsCheck = [
    "OSMPythonTools"
    "OSMPythonTools.api"
    "OSMPythonTools.data"
    "OSMPythonTools.element"
    "OSMPythonTools.nominatim"
    "OSMPythonTools.overpass"
  ];

  meta = {
    description = "Library to access OpenStreetMap-related services";
    longDescription = ''
      The python package OSMPythonTools provides easy access to
      OpenStreetMap-related services, among them an Overpass endpoint,
      Nominatim, and the OpenStreetMap editing API.
    '';
    homepage = "https://github.com/mocnik-science/osm-python-tools";
    license = lib.licenses.gpl3Only;
    changelog = "https://raw.githubusercontent.com/mocnik-science/osm-python-tools/v${version}/version-history.md";
    maintainers = with lib.maintainers; [ das-g ];
    teams = [ lib.teams.geospatial ];
  };
}