2023-03-04 12:14:45 +00:00
|
|
|
{ lib
|
2023-04-12 12:48:02 +00:00
|
|
|
, stdenv
|
2023-03-04 12:14:45 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
, lxml
|
2023-03-04 12:14:45 +00:00
|
|
|
, pyproj
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-dateutil
|
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
|
|
|
}:
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"test_ows_interfaces_wcs"
|
|
|
|
"test_wfs_110_remotemd"
|
|
|
|
"test_wfs_200_remotemd"
|
|
|
|
"test_wms_130_remotemd"
|
|
|
|
"test_wmts_example_informatievlaanderen"
|
2023-07-15 17:15:38 +00:00
|
|
|
"test_opensearch_creodias"
|
2023-04-12 12:48:02 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2023-11-16 04:20:00 +00:00
|
|
|
"test_ogcapi_processes_pygeoapi"
|
|
|
|
"test_ogcapi_records_pycsw"
|
2023-04-12 12:48:02 +00:00
|
|
|
"test_ogcapi_records_pygeoapi"
|
|
|
|
"test_wms_getfeatureinfo_130"
|
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
|
|
|
};
|
|
|
|
}
|