2020-09-27 07:42:18 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2018-08-04 12:33:32 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2020-09-27 07:42:18 +01:00
|
|
|
, glibcLocales
|
2018-08-04 12:33:32 +01:00
|
|
|
, nose
|
2019-03-25 00:21:27 +00:00
|
|
|
, pylibmc
|
|
|
|
, memcached
|
|
|
|
, redis
|
|
|
|
, pymongo
|
2018-08-04 12:33:32 +01:00
|
|
|
, mock
|
|
|
|
, webtest
|
|
|
|
, sqlalchemy
|
|
|
|
, pycrypto
|
2019-03-25 00:21:27 +00:00
|
|
|
, cryptography
|
2018-08-04 12:33:32 +01:00
|
|
|
, isPy27
|
2019-03-25 00:21:27 +00:00
|
|
|
, isPy3k
|
2021-03-24 16:45:56 +00:00
|
|
|
, funcsigs ? null
|
|
|
|
, pycryptopp ? null
|
2018-08-04 12:33:32 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Beaker";
|
2020-09-27 07:42:18 +01:00
|
|
|
version = "1.11.0";
|
2018-08-04 12:33:32 +01:00
|
|
|
|
|
|
|
# The pypy release do not contains the tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bbangert";
|
|
|
|
repo = "beaker";
|
2019-09-09 00:38:31 +01:00
|
|
|
rev = version;
|
2020-09-27 07:42:18 +01:00
|
|
|
sha256 = "059sc7iar90lc2y9mppdis5ddfcxyirz03gmsfb0307f5dsa1dhj";
|
2018-08-04 12:33:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
sqlalchemy
|
|
|
|
pycrypto
|
2019-03-25 00:21:27 +00:00
|
|
|
cryptography
|
2018-08-04 12:33:32 +01:00
|
|
|
] ++ lib.optionals (isPy27) [
|
|
|
|
funcsigs
|
|
|
|
pycryptopp
|
|
|
|
];
|
|
|
|
|
2019-03-25 00:21:27 +00:00
|
|
|
checkInputs = [
|
2020-09-27 07:42:18 +01:00
|
|
|
glibcLocales
|
|
|
|
memcached
|
2019-03-25 00:21:27 +00:00
|
|
|
mock
|
2020-09-27 07:42:18 +01:00
|
|
|
nose
|
2019-03-25 00:21:27 +00:00
|
|
|
pylibmc
|
|
|
|
pymongo
|
2020-09-27 07:42:18 +01:00
|
|
|
redis
|
|
|
|
webtest
|
2019-03-25 00:21:27 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# 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" \
|
2020-09-27 07:42:18 +01:00
|
|
|
${lib.optionalString (!stdenv.isLinux) ''-e "test_cookie_expires_different_locale"''} \
|
2019-03-25 00:21:27 +00:00
|
|
|
-vv tests
|
|
|
|
'';
|
|
|
|
|
2018-08-04 12:33:32 +01:00
|
|
|
meta = {
|
|
|
|
description = "A Session and Caching library with WSGI Middleware";
|
2019-07-03 10:27:39 +01:00
|
|
|
maintainers = with lib.maintainers; [ domenkozar ];
|
2018-08-04 12:33:32 +01:00
|
|
|
};
|
2019-03-25 00:21:27 +00:00
|
|
|
}
|