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