python3Packages.phonopy: fix build and tests

This commit is contained in:
Jonathan Ringer 2020-08-27 14:37:40 -07:00
parent 1c2ebdc5a3
commit 135a6f83ea
No known key found for this signature in database
GPG Key ID: 5C841D3CFDFEC4E0

View File

@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, python, fetchPypi, numpy, pyyaml, matplotlib, h5py }: { stdenv, buildPythonPackage, python, fetchPypi, numpy, pyyaml, matplotlib, h5py, spglib, pytestCheckHook }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "phonopy"; pname = "phonopy";
@ -9,15 +9,15 @@ buildPythonPackage rec {
sha256 = "482c6ff29c058d091ac885e561e28ba3e516ea9e91c44a951cad11f3ae19856c"; sha256 = "482c6ff29c058d091ac885e561e28ba3e516ea9e91c44a951cad11f3ae19856c";
}; };
propagatedBuildInputs = [ numpy pyyaml matplotlib h5py ]; propagatedBuildInputs = [ numpy pyyaml matplotlib h5py spglib ];
checkPhase = '' checkInputs = [ pytestCheckHook ];
cd test # flakey due to floating point inaccuracy
# dynamic structure factor test ocassionally fails do to roundoff disabledTests = [ "test_NaCl" ];
# see issue https://github.com/atztogo/phonopy/issues/79
rm spectrum/test_dynamic_structure_factor.py # prevent pytest from importing local directory
${python.interpreter} -m unittest discover -b preCheck = ''
cd ../.. rm -r phonopy
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {