2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-02-05 17:12:51 +00:00
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, beautifulsoup4
|
|
|
|
, geojson
|
|
|
|
, lxml
|
|
|
|
, matplotlib
|
|
|
|
, numpy
|
|
|
|
, pandas
|
|
|
|
, ujson
|
|
|
|
, xarray
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "osmpythontools";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "0.3.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mocnik-science";
|
|
|
|
repo = "osm-python-tools";
|
|
|
|
rev = "v${version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "1m5ai9h1zbp79x0vb138fmyh2hg8lqp859s7j33lra9hds6wb40a";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
# Upstream setup.py has test dependencies in `install_requires` argument.
|
|
|
|
# Remove them, as we don't run the tests.
|
2021-02-05 17:12:51 +00:00
|
|
|
patches = [ ./remove-test-only-dependencies.patch ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
beautifulsoup4
|
|
|
|
geojson
|
|
|
|
lxml
|
|
|
|
matplotlib
|
|
|
|
numpy
|
|
|
|
pandas
|
|
|
|
ujson
|
|
|
|
xarray
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
# tests touch network
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"OSMPythonTools"
|
|
|
|
"OSMPythonTools.api"
|
|
|
|
"OSMPythonTools.data"
|
|
|
|
"OSMPythonTools.element"
|
|
|
|
"OSMPythonTools.nominatim"
|
|
|
|
"OSMPythonTools.overpass"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A 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";
|
2021-02-16 17:04:54 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ das-g ];
|
|
|
|
};
|
|
|
|
}
|