Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytestCheckHook, 6 pythonOlder, 7 8 certifi, 9 cython, 10 gdal, 11 numpy, 12 packaging, 13 setuptools, 14 versioneer, 15 wheel, 16}: 17 18buildPythonPackage rec { 19 pname = "pyogrio"; 20 version = "0.9.0"; 21 pyproject = true; 22 disabled = pythonOlder "3.8"; 23 24 src = fetchFromGitHub { 25 owner = "geopandas"; 26 repo = "pyogrio"; 27 rev = "v${version}"; 28 hash = "sha256-HC7+dDehDwEIDQnCMYrsC1jE78AyfHqEhfOZLYSzTIw="; 29 }; 30 31 postPatch = '' 32 substituteInPlace pyproject.toml \ 33 --replace-fail "versioneer[toml]==0.28" "versioneer[toml]" 34 ''; 35 36 nativeBuildInputs = [ 37 cython 38 gdal # for gdal-config 39 setuptools 40 versioneer 41 wheel 42 ] ++ versioneer.optional-dependencies.toml; 43 44 buildInputs = [ gdal ]; 45 46 propagatedBuildInputs = [ 47 certifi 48 numpy 49 packaging 50 ]; 51 52 nativeCheckInputs = [ pytestCheckHook ]; 53 54 preCheck = '' 55 python setup.py build_ext --inplace 56 ''; 57 58 pytestFlagsArray = [ 59 # disable tests which require network access 60 "-m 'not network'" 61 ]; 62 63 pythonImportsCheck = [ "pyogrio" ]; 64 65 meta = { 66 description = "Vectorized spatial vector file format I/O using GDAL/OGR"; 67 homepage = "https://pyogrio.readthedocs.io/"; 68 changelog = "https://github.com/geopandas/pyogrio/blob/${src.rev}/CHANGES.md"; 69 license = lib.licenses.mit; 70 maintainers = lib.teams.geospatial.members; 71 }; 72}