Merge pull request #58231 from Zer0-/fix_py_beaker

python beaker: 1.8.0 -> 1.10.1 fix building on hydra
This commit is contained in:
Robert Schütz 2019-04-02 10:35:45 +02:00 committed by GitHub
commit 277263b05c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 9 deletions

View File

@ -2,40 +2,73 @@
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, nose , nose
, pylibmc
, memcached
, redis
, pymongo
, mock , mock
, webtest , webtest
, sqlalchemy , sqlalchemy
, pycrypto , pycrypto
, cryptography
, isPy27 , isPy27
, isPy3k
, funcsigs , funcsigs
, pycryptopp , pycryptopp
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "Beaker"; pname = "Beaker";
version = "1.8.0"; version = "1.10.1";
# The pypy release do not contains the tests # The pypy release do not contains the tests
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "bbangert"; owner = "bbangert";
repo = "beaker"; repo = "beaker";
rev = "${version}"; rev = "${version}";
sha256 = "17yfr7a307n8rdl09was4j60xqk2s0hk0hywdkigrpj4qnw0is7g"; sha256 = "0xrvg503xmi28w0hllr4s7fkap0p09fgw2wax3p1s2r6b3xjvbz7";
}; };
buildInputs =
[ nose
mock
webtest
];
propagatedBuildInputs = [ propagatedBuildInputs = [
sqlalchemy sqlalchemy
pycrypto pycrypto
cryptography
] ++ lib.optionals (isPy27) [ ] ++ lib.optionals (isPy27) [
funcsigs funcsigs
pycryptopp pycryptopp
]; ];
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
'';
meta = { meta = {
description = "A Session and Caching library with WSGI Middleware"; description = "A Session and Caching library with WSGI Middleware";
maintainers = with lib.maintainers; [ garbas domenkozar ]; maintainers = with lib.maintainers; [ garbas domenkozar ];

View File

@ -14,7 +14,7 @@ buildPythonPackage rec {
py.test -k 'not test_includeme' pyramid_beaker/tests.py py.test -k 'not test_includeme' pyramid_beaker/tests.py
''; '';
buildInputs = [ pytest ]; checkInputs = [ pytest ];
propagatedBuildInputs = [ beaker pyramid ]; propagatedBuildInputs = [ beaker pyramid ];