Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 70 lines 1.4 kB view raw
1{ stdenv 2, libev 3, buildPythonPackage 4, fetchPypi 5, cython 6, futures 7, six 8, python 9, scales 10, eventlet 11, twisted 12, mock 13, gevent 14, nose 15, pytz 16, pyyaml 17, sure 18, pythonOlder 19}: 20 21buildPythonPackage rec { 22 pname = "cassandra-driver"; 23 version = "3.18.0"; 24 25 src = fetchPypi { 26 inherit pname version; 27 sha256 = "1w9a7fdl626m977cjj9zclh4a0mr3s4q9jpwm1fsmpi7v3gbribi"; 28 }; 29 30 buildInputs = [ 31 libev 32 ]; 33 34 nativeBuildInputs = [ 35 # NOTE: next version will work with cython 0.29 36 # Requires 'Cython!=0.25,<0.29,>=0.20' 37 (cython.overridePythonAttrs(old: rec { 38 pname = "Cython"; 39 version = "0.28.3"; 40 src = fetchPypi { 41 inherit pname version; 42 sha256 = "1aae6d6e9858888144cea147eb5e677830f45faaff3d305d77378c3cba55f526"; 43 }; 44 })) 45 ]; 46 47 propagatedBuildInputs = [ six ] 48 ++ stdenv.lib.optionals (pythonOlder "3.4") [ futures ]; 49 50 postPatch = '' 51 sed -i "s/<=1.0.1//" setup.py 52 ''; 53 54 checkPhase = '' 55 ${python.interpreter} setup.py gevent_nosetests 56 ${python.interpreter} setup.py eventlet_nosetests 57 ''; 58 59 checkInputs = [ scales eventlet twisted mock gevent nose pytz pyyaml sure ]; 60 61 # Could not get tests running 62 doCheck = false; 63 64 meta = with stdenv.lib; { 65 homepage = http://datastax.github.io/python-driver/; 66 description = "A Python client driver for Apache Cassandra"; 67 license = licenses.asl20; 68 }; 69 70}