summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2020-09-03 01:33:14 +0100
committerGitHub <noreply@github.com>2020-09-03 01:33:14 +0100
commit55e8cbd26304ca0d82fd1ae2a53731dc9e1723fe (patch)
tree907cbebc6b74604d49cc2cb92ea5da901a16fb7d
parent8761381344a56a2e05229e2cbbf8b580d206ceed (diff)
parent135a6f83ea104b73bc118e4bf3bf92476adb4a71 (diff)
Merge pull request #96501 from jonringer/fix-phonopy
python3Packages.phonopy: fix build and tests
-rw-r--r--pkgs/development/python-modules/phonopy/default.nix18
1 files changed, 9 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/phonopy/default.nix b/pkgs/development/python-modules/phonopy/default.nix
index 3bc510f678a4..b476543c06a9 100644
--- a/pkgs/development/python-modules/phonopy/default.nix
+++ b/pkgs/development/python-modules/phonopy/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildPythonPackage, python, fetchPypi, numpy, pyyaml, matplotlib, h5py }:
+{ stdenv, buildPythonPackage, python, fetchPypi, numpy, pyyaml, matplotlib, h5py, spglib, pytestCheckHook }:
buildPythonPackage rec {
pname = "phonopy";
@@ -9,15 +9,15 @@ buildPythonPackage rec {
sha256 = "482c6ff29c058d091ac885e561e28ba3e516ea9e91c44a951cad11f3ae19856c";
};
- propagatedBuildInputs = [ numpy pyyaml matplotlib h5py ];
+ propagatedBuildInputs = [ numpy pyyaml matplotlib h5py spglib ];
- checkPhase = ''
- cd test
- # dynamic structure factor test ocassionally fails do to roundoff
- # see issue https://github.com/atztogo/phonopy/issues/79
- rm spectrum/test_dynamic_structure_factor.py
- ${python.interpreter} -m unittest discover -b
- cd ../..
+ checkInputs = [ pytestCheckHook ];
+ # flakey due to floating point inaccuracy
+ disabledTests = [ "test_NaCl" ];
+
+ # prevent pytest from importing local directory
+ preCheck = ''
+ rm -r phonopy
'';
meta = with stdenv.lib; {