Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.03 1.5 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, nose 5, pylibmc 6, memcached 7, redis 8, pymongo 9, mock 10, webtest 11, sqlalchemy 12, pycrypto 13, cryptography 14, isPy27 15, isPy3k 16, funcsigs 17, pycryptopp 18}: 19 20buildPythonPackage rec { 21 pname = "Beaker"; 22 version = "1.10.1"; 23 24 # The pypy release do not contains the tests 25 src = fetchFromGitHub { 26 owner = "bbangert"; 27 repo = "beaker"; 28 rev = "${version}"; 29 sha256 = "0xrvg503xmi28w0hllr4s7fkap0p09fgw2wax3p1s2r6b3xjvbz7"; 30 }; 31 32 propagatedBuildInputs = [ 33 sqlalchemy 34 pycrypto 35 cryptography 36 ] ++ lib.optionals (isPy27) [ 37 funcsigs 38 pycryptopp 39 ]; 40 41 checkInputs = [ 42 nose 43 mock 44 webtest 45 pylibmc 46 memcached 47 redis 48 pymongo 49 ]; 50 51 52 # Can not run memcached tests because it immediately tries to connect 53 postPatch = lib.optionalString isPy3k '' 54 substituteInPlace setup.py \ 55 --replace "python-memcached" "python3-memcached" 56 '' + '' 57 58 rm tests/test_memcached.py 59 ''; 60 61 # Disable external tests because they need to connect to a live database. 62 # Also disable a test in test_cache.py called "test_upgrade" because 63 # it currently fails on darwin. 64 # Please see issue https://github.com/bbangert/beaker/issues/166 65 checkPhase = '' 66 nosetests \ 67 -e ".*test_ext_.*" \ 68 -e "test_upgrade" \ 69 -vv tests 70 ''; 71 72 meta = { 73 description = "A Session and Caching library with WSGI Middleware"; 74 maintainers = with lib.maintainers; [ garbas domenkozar ]; 75 }; 76}