Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, lxml 6, pyproj 7, pytestCheckHook 8, python-dateutil 9, pythonOlder 10, pytz 11, pyyaml 12, requests 13, python 14}: 15 16buildPythonPackage rec { 17 pname = "owslib"; 18 version = "0.29.2"; 19 format = "setuptools"; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchFromGitHub { 24 owner = "geopython"; 25 repo = "OWSLib"; 26 rev = "refs/tags/${version}"; 27 hash = "sha256-dbL4VdnPszwiDO+UjluuyqeBRMKojTnZPEFKEYiIWS0="; 28 }; 29 30 postPatch = '' 31 substituteInPlace tox.ini \ 32 --replace " --doctest-modules --doctest-glob 'tests/**/*.txt' --cov-report term-missing --cov owslib" "" 33 ''; 34 35 propagatedBuildInputs = [ 36 lxml 37 pyproj 38 python-dateutil 39 pytz 40 pyyaml 41 requests 42 ]; 43 44 nativeCheckInputs = [ 45 pytestCheckHook 46 ]; 47 48 pythonImportsCheck = [ 49 "owslib" 50 ]; 51 52 preCheck = '' 53 # _pytest.pathlib.ImportPathMismatchError: ('owslib.swe.sensor.sml', '/build/source/build/... 54 export PY_IGNORE_IMPORTMISMATCH=1 55 ''; 56 57 disabledTests = [ 58 # Tests require network access 59 "test_ows_interfaces_wcs" 60 "test_wfs_110_remotemd" 61 "test_wfs_200_remotemd" 62 "test_wms_130_remotemd" 63 "test_wmts_example_informatievlaanderen" 64 "test_opensearch_creodias" 65 ] ++ lib.optionals stdenv.isDarwin [ 66 "test_ogcapi_records_pygeoapi" 67 "test_wms_getfeatureinfo_130" 68 ]; 69 70 meta = with lib; { 71 description = "Client for Open Geospatial Consortium web service interface standards"; 72 homepage = "https://www.osgeo.org/projects/owslib/"; 73 changelog = "https://github.com/geopython/OWSLib/blob/${version}/CHANGES.rst"; 74 license = licenses.bsd3; 75 maintainers = teams.geospatial.members; 76 }; 77}