nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 48 lines 985 B view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, python 5, geos 6, pytestCheckHook 7, cython 8, numpy 9}: 10 11buildPythonPackage rec { 12 pname = "pygeos"; 13 version = "0.12.0"; 14 15 src = fetchPypi { 16 inherit pname version; 17 sha256 = "sha256-PEFULvZ8ZgFfRDrj5uaDUDqKIh+cJPsjgPauQq7RYAo="; 18 }; 19 20 nativeBuildInputs = [ 21 geos # for geos-config 22 cython 23 ]; 24 25 propagatedBuildInputs = [ numpy ]; 26 27 # The cythonized extensions are required to exist in the pygeos/ directory 28 # for the package to function. Therefore override of buildPhase was 29 # necessary. 30 buildPhase = '' 31 ${python.interpreter} setup.py build_ext --inplace 32 ${python.interpreter} setup.py bdist_wheel 33 ''; 34 35 checkInputs = [ 36 pytestCheckHook 37 ]; 38 39 pythonImportsCheck = [ "pygeos" ]; 40 41 meta = with lib; { 42 description = "Wraps GEOS geometry functions in numpy ufuncs."; 43 homepage = "https://github.com/pygeos/pygeos"; 44 license = licenses.bsd3; 45 maintainers = with maintainers; [ nialov ]; 46 }; 47} 48