Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 54 lines 1.3 kB view raw
1{ stdenv, lib, buildPythonPackage, fetchPypi, isPy3k, pythonOlder 2, attrs, click, cligj, click-plugins, six, munch, enum34 3, pytest, boto3, mock, giflib 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.13"; 10 11 src = fetchPypi { 12 inherit pname version; 13 sha256 = "5ec34898c8b983a723fb4e949dd3e0ed7e691c303e51f6bfd61e52ac9ac813ae"; 14 }; 15 16 CXXFLAGS = 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 ] ++ lib.optionals stdenv.cc.isClang [ giflib ]; 25 26 propagatedBuildInputs = [ 27 attrs 28 click 29 cligj 30 click-plugins 31 six 32 munch 33 ] ++ lib.optional (!isPy3k) enum34; 34 35 checkInputs = [ 36 pytest 37 boto3 38 ] ++ 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 lib; { 49 description = "OGR's neat, nimble, no-nonsense API for Python"; 50 homepage = "https://fiona.readthedocs.io/"; 51 license = licenses.bsd3; 52 maintainers = with maintainers; [ knedlsepp ]; 53 }; 54}