2018-08-04 13:33:32 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nose
|
2019-03-25 01:21:27 +01:00
|
|
|
, pylibmc
|
|
|
|
, memcached
|
|
|
|
, redis
|
|
|
|
, pymongo
|
2018-08-04 13:33:32 +02:00
|
|
|
, mock
|
|
|
|
, webtest
|
|
|
|
, sqlalchemy
|
|
|
|
, pycrypto
|
2019-03-25 01:21:27 +01:00
|
|
|
, cryptography
|
2018-08-04 13:33:32 +02:00
|
|
|
, isPy27
|
2019-03-25 01:21:27 +01:00
|
|
|
, isPy3k
|
2018-08-04 13:33:32 +02:00
|
|
|
, funcsigs
|
|
|
|
, pycryptopp
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Beaker";
|
2019-03-25 01:21:27 +01:00
|
|
|
version = "1.10.1";
|
2018-08-04 13:33:32 +02:00
|
|
|
|
|
|
|
# The pypy release do not contains the tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bbangert";
|
|
|
|
repo = "beaker";
|
2019-09-09 01:38:31 +02:00
|
|
|
rev = version;
|
2019-03-25 01:21:27 +01:00
|
|
|
sha256 = "0xrvg503xmi28w0hllr4s7fkap0p09fgw2wax3p1s2r6b3xjvbz7";
|
2018-08-04 13:33:32 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
sqlalchemy
|
|
|
|
pycrypto
|
2019-03-25 01:21:27 +01:00
|
|
|
cryptography
|
2018-08-04 13:33:32 +02:00
|
|
|
] ++ lib.optionals (isPy27) [
|
|
|
|
funcsigs
|
|
|
|
pycryptopp
|
|
|
|
];
|
|
|
|
|
2019-03-25 01:21:27 +01:00
|
|
|
checkInputs = [
|
|
|
|
nose
|
|
|
|
mock
|
|
|
|
webtest
|
|
|
|
pylibmc
|
|
|
|
memcached
|
|
|
|
redis
|
|
|
|
pymongo
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
# Can not run memcached tests because it immediately tries to connect
|
|
|
|
postPatch = lib.optionalString isPy3k ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "python-memcached" "python3-memcached"
|
|
|
|
'' + ''
|
|
|
|
|
|
|
|
rm tests/test_memcached.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Disable external tests because they need to connect to a live database.
|
|
|
|
# Also disable a test in test_cache.py called "test_upgrade" because
|
|
|
|
# it currently fails on darwin.
|
|
|
|
# Please see issue https://github.com/bbangert/beaker/issues/166
|
|
|
|
checkPhase = ''
|
|
|
|
nosetests \
|
|
|
|
-e ".*test_ext_.*" \
|
|
|
|
-e "test_upgrade" \
|
|
|
|
-vv tests
|
|
|
|
'';
|
|
|
|
|
2018-08-04 13:33:32 +02:00
|
|
|
meta = {
|
|
|
|
description = "A Session and Caching library with WSGI Middleware";
|
2019-07-03 11:27:39 +02:00
|
|
|
maintainers = with lib.maintainers; [ domenkozar ];
|
2018-08-04 13:33:32 +02:00
|
|
|
};
|
2019-03-25 01:21:27 +01:00
|
|
|
}
|