Merge remote-tracking branch 'upstream/master' into staging

This commit is contained in:
Tuomas Tynkkynen
2018-01-16 22:49:20 +02:00
89 changed files with 3918 additions and 1098 deletions

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchPypi, buildPythonPackage, isPy3k }:
{ stdenv, fetchPypi, buildPythonPackage, python, isPy3k, glibcLocales }:
buildPythonPackage rec {
pname = "aenum";
@@ -10,12 +10,17 @@ buildPythonPackage rec {
sha256 = "d98bc55136d696fcf323760c3db0de489da9e41fd51283fa6f90205deb85bf6a";
};
doCheck = !isPy3k;
# The following tests fail (only in python3
# test_convert (aenum.test.TestIntEnumConvert)
# test_convert_value_lookup_priority (aenum.test.TestIntEnumConvert)
# test_convert (aenum.test.TestIntEnumConvert)
# test_convert_value_lookup_priority (aenum.test.TestIntEnumConvert)
# For Python 3, locale has to be set to en_US.UTF-8 for
# tests to pass
checkInputs = if isPy3k then [ glibcLocales ] else [];
checkPhase = ''
runHook preCheck
${if isPy3k then "export LC_ALL=en_US.UTF-8" else ""}
PYTHONPATH=`pwd` ${python.interpreter} aenum/test.py
runHook postCheck
'';
meta = {
description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants";

View File

@@ -0,0 +1,27 @@
{ stdenv, fetchPypi, buildPythonPackage, nose, six, glibcLocales, isPy3k }:
buildPythonPackage rec {
pname = "nose-parameterized";
version = "0.6.0";
src = fetchPypi {
inherit pname version;
sha256 = "1khlabgib4161vn6alxsjaa8javriywgx9vydddi659gp9x6fpnk";
};
# Tests require some python3-isms but code works without.
doCheck = isPy3k;
buildInputs = [ nose glibcLocales ];
propagatedBuildInputs = [ six ];
checkPhase = ''
LC_ALL="en_US.UTF-8" nosetests -v
'';
meta = with stdenv.lib; {
description = "Parameterized testing with any Python test framework";
homepage = https://pypi.python.org/pypi/nose-parameterized;
license = licenses.bsd3;
};
}

View File

@@ -20,8 +20,9 @@ buildPythonPackage rec {
LC_ALL="en_US.UTF-8";
# Disable doctests on OSX: https://github.com/scikit-learn/scikit-learn/issues/10213
checkPhase = ''
HOME=$TMPDIR OMP_NUM_THREADS=1 nosetests $out/${python.sitePackages}/sklearn/
HOME=$TMPDIR OMP_NUM_THREADS=1 nosetests ${stdenv.lib.optionalString stdenv.isDarwin "--doctest-options=+SKIP"} $out/${python.sitePackages}/sklearn/
'';
meta = with stdenv.lib; {

View File

@@ -16,7 +16,7 @@ buildPythonPackage rec {
checkInputs = [ pytest requests glibcLocales hypothesis ];
checkPhase = ''
LC_ALL="en_US.UTF-8" py.test
LC_ALL="en_US.UTF-8" py.test ${stdenv.lib.optionalString stdenv.isDarwin "-k 'not test_get_machine_id'"}
'';
meta = with stdenv.lib; {