mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-26 06:44:06 +00:00
Merge pull request #233626 from yl3dy/fix_pymanopt
python3Packages.pymanopt: marked as broken
This commit is contained in:
commit
09132ae744
@ -5,14 +5,14 @@
|
||||
, scipy
|
||||
, torch
|
||||
, autograd
|
||||
, nose2
|
||||
, matplotlib
|
||||
, tensorflow
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pymanopt";
|
||||
version = "2.1.1";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
@ -22,25 +22,21 @@ buildPythonPackage rec {
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ numpy scipy torch ];
|
||||
nativeCheckInputs = [ nose2 autograd matplotlib tensorflow ];
|
||||
nativeCheckInputs = [ autograd matplotlib pytestCheckHook ];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
# upstream themselves seem unsure about the robustness of these
|
||||
# tests - see https://github.com/pymanopt/pymanopt/issues/219
|
||||
grep -lr 'test_second_order_function_approximation' tests/ | while read -r fn ; do
|
||||
substituteInPlace "$fn" \
|
||||
--replace \
|
||||
'test_second_order_function_approximation' \
|
||||
'dont_test_second_order_function_approximation'
|
||||
done
|
||||
|
||||
nose2 tests -v
|
||||
|
||||
runHook postCheck
|
||||
preCheck = ''
|
||||
substituteInPlace "tests/conftest.py" \
|
||||
--replace "import tensorflow as tf" ""
|
||||
substituteInPlace "tests/conftest.py" \
|
||||
--replace "tf.random.set_seed(seed)" ""
|
||||
'';
|
||||
|
||||
disabledTestPaths = [
|
||||
"tests/test_examples.py"
|
||||
"tests/backends/test_tensorflow.py"
|
||||
"tests/test_problem.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "pymanopt" ];
|
||||
|
||||
meta = {
|
||||
@ -48,5 +44,6 @@ buildPythonPackage rec {
|
||||
homepage = "https://www.pymanopt.org/";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ yl3dy ];
|
||||
broken = lib.versionAtLeast scipy.version "1.10.0";
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user