2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
lxml,
|
|
|
|
pyproj,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-dateutil,
|
|
|
|
pythonOlder,
|
|
|
|
pytz,
|
|
|
|
pyyaml,
|
|
|
|
requests,
|
2023-03-04 12:14:45 +00:00
|
|
|
}:
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
2023-03-04 12:14:45 +00:00
|
|
|
pname = "owslib";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.31.0";
|
2023-03-04 12:14:45 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "geopython";
|
|
|
|
repo = "OWSLib";
|
2024-05-15 15:35:15 +00:00
|
|
|
rev = version;
|
|
|
|
hash = "sha256-vjJsLavVOqTTrVtYbtA0G+nl0HanKeGtzNFFj92Frw8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postPatch = ''
|
2023-03-04 12:14:45 +00:00
|
|
|
substituteInPlace tox.ini \
|
|
|
|
--replace " --doctest-modules --doctest-glob 'tests/**/*.txt' --cov-report term-missing --cov owslib" ""
|
2022-08-12 12:06:08 +00:00
|
|
|
'';
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-03-15 16:39:30 +00:00
|
|
|
lxml
|
2023-03-04 12:14:45 +00:00
|
|
|
pyproj
|
|
|
|
python-dateutil
|
|
|
|
pytz
|
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-03-04 12:14:45 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "owslib" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
preCheck = ''
|
|
|
|
# _pytest.pathlib.ImportPathMismatchError: ('owslib.swe.sensor.sml', '/build/source/build/...
|
|
|
|
export PY_IGNORE_IMPORTMISMATCH=1
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# disable tests which require network access
|
|
|
|
"-m 'not online'"
|
2023-03-04 12:14:45 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-03-04 12:14:45 +00:00
|
|
|
description = "Client for Open Geospatial Consortium web service interface standards";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.osgeo.org/projects/owslib/";
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/geopython/OWSLib/releases/tag/${version}";
|
2023-03-04 12:14:45 +00:00
|
|
|
license = licenses.bsd3;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = teams.geospatial.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|