1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

Merge pull request #46608 from xeji/p/python-fixes-2

pythonPackages: fix some broken builds
This commit is contained in:
xeji 2018-09-14 10:56:59 +02:00 committed by GitHub
commit f1f8ce80c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 24 deletions

View file

@ -2,6 +2,7 @@
, fetchPypi
, flask
, pymongo
, vcversioner
, lib
, pytest
}:
@ -18,17 +19,17 @@ buildPythonPackage rec {
checkInputs = [ pytest ];
checkPhase = ''
py.test tests
py.test
'';
# Tests seem to hang
doCheck = false;
propagatedBuildInputs = [ flask pymongo ];
propagatedBuildInputs = [ flask pymongo vcversioner ];
meta = {
homepage = "http://flask-pymongo.readthedocs.org/";
description = "PyMongo support for Flask applications";
license = lib.licenses.bsd2;
};
}
}

View file

@ -4,7 +4,7 @@
}:
buildPythonPackage rec {
pname = "daphne";
version = "2.1.0";
version = "2.2.2";
disabled = !isPy3k;
@ -12,7 +12,7 @@ buildPythonPackage rec {
owner = "django";
repo = pname;
rev = version;
sha256 = "1lbpn0l796ar77amqy8dap30zxmsn6as8y2lbmp4lk8m9awscwi8";
sha256 = "1pr3b7zxjp2jx31lpiy1hfyprpmyiv2kd18n8x6kh6gd5nr0dgp8";
};
nativeBuildInputs = [ pytestrunner ];
@ -21,9 +21,10 @@ buildPythonPackage rec {
checkInputs = [ hypothesis pytest pytest-asyncio ];
doCheck = !stdenv.isDarwin; # most tests fail on darwin
checkPhase = ''
# Other tests fail, seems to be due to filesystem access
py.test -k "test_cli or test_utils"
py.test
'';
meta = with stdenv.lib; {

View file

@ -1,5 +1,5 @@
{ stdenv, buildPythonPackage, fetchPypi, flask, jinja2, itsdangerous, events
, markupsafe, pymongo, flask-pymongo, werkzeug, simplejson, cerberus }:
{ stdenv, buildPythonPackage, fetchPypi, flask, events
, pymongo, simplejson, cerberus }:
buildPythonPackage rec {
pname = "Eve";
@ -13,14 +13,9 @@ buildPythonPackage rec {
propagatedBuildInputs = [
cerberus
events
flask-pymongo
flask
itsdangerous
jinja2
markupsafe
pymongo
simplejson
werkzeug
];
# tests call a running mongodb instance

View file

@ -11,9 +11,13 @@ buildPythonPackage rec {
sha256 = "5049363eb6da2e7c35589477dfc79bf69929ca66de2d7ed2e9dc07acf78636f4";
};
checkPhase = "nosetests --exclude with_expand_user nilearn/tests";
# disable some failing tests
checkPhase = ''
nosetests nilearn/tests \
-e test_cache_mixin_with_expand_user -e test_clean_confounds -e test_detrend
'';
buildInputs = [ nose ];
checkInputs = [ nose ];
propagatedBuildInputs = [
matplotlib

View file

@ -9,10 +9,13 @@ buildPythonPackage rec {
sha256 = "be6bf93ed618c8899aeb6721c24f8009c769879a3b4931e05650f3c173ec17c5";
};
checkInputs = [ pytest mock ];
checkInputs = [ mock ];
propagatedBuildInputs = [ pytest ];
# disable tests that fail with pytest 3.7.4
checkPhase = ''
py.test
py.test test_pytest_rerunfailures.py -k 'not test_reruns_with_delay'
'';
meta = with stdenv.lib; {

View file

@ -6,27 +6,28 @@
, msgpack
, mecab-python3
, jieba
, nose
, pytest
, pythonOlder
, fetchFromGitHub
}:
buildPythonPackage rec {
pname = "wordfreq";
version = "2.0";
version = "2.2.0";
src = fetchFromGitHub {
owner = "LuminosoInsight";
repo = "wordfreq";
rev = "e3a1b470d9f8e0d82e9f179ffc41abba434b823b";
sha256 = "1wjkhhj7nxfnrghwvmvwc672s30lp4b7yr98gxdxgqcq6wdshxwv";
# upstream don't tag by version
rev = "bc12599010c8181a725ec97d0b3990758a48da36";
sha256 = "195794vkzq5wsq3mg1dgfhlnz2f7vi1xajlifq6wkg4lzwyq262m";
};
checkInputs = [ nose ];
checkInputs = [ pytest ];
checkPhase = ''
# These languages require additional dictionaries
nosetests -e test_japanese -e test_korean -e test_languages
pytest tests -k 'not test_japanese and not test_korean and not test_languages and not test_french_and_related'
'';
propagatedBuildInputs = [ regex langcodes ftfy msgpack mecab-python3 jieba ];