Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 54 lines 1.3 kB view raw
1{ stdenv, buildPythonPackage, fetchPypi, isPy3k, pythonOlder 2, attrs, click, cligj, click-plugins, six, munch, enum34 3, pytest, boto3, mock 4, gdal_2 # can't bump to 3 yet, https://github.com/Toblerity/Fiona/issues/745 5}: 6 7buildPythonPackage rec { 8 pname = "Fiona"; 9 version = "1.8.6"; 10 11 src = fetchPypi { 12 inherit pname version; 13 sha256 = "0gpvdrayam4qvpqvz0911nlyvf7ib3slsyml52qx172vhpldycgs"; 14 }; 15 16 CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isClang "-std=c++11"; 17 18 nativeBuildInputs = [ 19 gdal_2 # for gdal-config 20 ]; 21 22 buildInputs = [ 23 gdal_2 24 ]; 25 26 propagatedBuildInputs = [ 27 attrs 28 click 29 cligj 30 click-plugins 31 six 32 munch 33 ] ++ stdenv.lib.optional (!isPy3k) enum34; 34 35 checkInputs = [ 36 pytest 37 boto3 38 ] ++ stdenv.lib.optional (pythonOlder "3.4") mock; 39 40 checkPhase = '' 41 rm -r fiona # prevent importing local fiona 42 # Some tests access network, others test packaging 43 pytest -k "not test_*_http \ 44 and not test_*_https \ 45 and not test_*_wheel" 46 ''; 47 48 meta = with stdenv.lib; { 49 description = "OGR's neat, nimble, no-nonsense API for Python"; 50 homepage = http://toblerity.org/fiona/; 51 license = licenses.bsd3; 52 maintainers = with maintainers; [ knedlsepp ]; 53 }; 54}