Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 57 lines 1.4 kB view raw
1{ lib, buildPythonPackage, fetchFromGitHub, python, pkgs, pythonOlder, isPy27, substituteAll 2, aenum 3, cython 4, pytest 5, mock 6, numpy 7, shapely 8}: 9 10buildPythonPackage rec { 11 pname = "pyproj"; 12 version = "2.6.0"; 13 disabled = isPy27; 14 15 src = fetchFromGitHub { 16 owner = "pyproj4"; 17 repo = "pyproj"; 18 rev = "v${version}rel"; 19 sha256 = "0fyggkbr3kp8mlq4c0r8sl5ah58bdg2mj4kzql9p3qyrkcdlgixh"; 20 }; 21 22 # force pyproj to use ${pkgs.proj} 23 patches = [ 24 (substituteAll { 25 src = ./001.proj.patch; 26 proj = pkgs.proj; 27 projdev = pkgs.proj.dev; 28 }) 29 ]; 30 31 buildInputs = [ cython pkgs.proj ]; 32 33 propagatedBuildInputs = [ 34 numpy shapely 35 ] ++ lib.optional (pythonOlder "3.6") aenum; 36 37 checkInputs = [ pytest mock ]; 38 39 # ignore rounding errors, and impure docgen 40 # datadir is ignored because it does the proj look up logic, which isn't relevant 41 checkPhase = '' 42 pytest . -k 'not alternative_grid_name \ 43 and not transform_wgs84_to_alaska \ 44 and not transformer_group__unavailable \ 45 and not transform_group__missing_best \ 46 and not datum \ 47 and not repr' \ 48 --ignore=test/test_doctest_wrapper.py \ 49 --ignore=test/test_datadir.py 50 ''; 51 52 meta = { 53 description = "Python interface to PROJ.4 library"; 54 homepage = "https://github.com/jswhit/pyproj"; 55 license = with lib.licenses; [ isc ]; 56 }; 57}