1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 lxml,
7 pyproj,
8 pytestCheckHook,
9 python-dateutil,
10 pythonOlder,
11 pytz,
12 pyyaml,
13 requests,
14}:
15
16buildPythonPackage rec {
17 pname = "owslib";
18 version = "0.31.0";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "geopython";
25 repo = "OWSLib";
26 rev = version;
27 hash = "sha256-vjJsLavVOqTTrVtYbtA0G+nl0HanKeGtzNFFj92Frw8=";
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 = [ pytestCheckHook ];
45
46 pythonImportsCheck = [ "owslib" ];
47
48 preCheck = ''
49 # _pytest.pathlib.ImportPathMismatchError: ('owslib.swe.sensor.sml', '/build/source/build/...
50 export PY_IGNORE_IMPORTMISMATCH=1
51 '';
52
53 pytestFlagsArray = [
54 # disable tests which require network access
55 "-m 'not online'"
56 ];
57
58 meta = with lib; {
59 description = "Client for Open Geospatial Consortium web service interface standards";
60 homepage = "https://www.osgeo.org/projects/owslib/";
61 changelog = "https://github.com/geopython/OWSLib/releases/tag/${version}";
62 license = licenses.bsd3;
63 maintainers = teams.geospatial.members;
64 };
65}