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