git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.aplpy: add checkPhase
commitffd71594f61d48e08fb3976ac7b8dffbc07bdc60 authorSébastien Maret <sebastien.maret@icloud.com> dateTue 23 Jul 2019, 12:50 (7 years ago) parent723382b
1 file changed+12−3
pkgs/development/python-modules/aplpy/default.nix+12−3
pkgs/development/python-modules/aplpy/default.nix+12−3
@@ -11,14 +11,14 @@
1111, pillow
1212, scikitimage
1313, shapely
14+, pytest
15+, pytest-astropy
1416}:
1517
1618buildPythonPackage rec {
1719 pname = "aplpy";
1820 version = "2.0.3";
1921
20− doCheck = false; # tests require pytest-astropy
21−
2222 src = fetchPypi {
2323 pname = "APLpy";
2424 inherit version;
@@ -28,7 +28,6 @@ buildPythonPackage rec {
2828 propagatedBuildInputs = [
2929 numpy
3030 astropy
31− astropy-helpers
3231 matplotlib
3332 reproject
3433 pyavm
@@ -38,11 +37,21 @@ buildPythonPackage rec {
3837 shapely
3938 ];
4039
40+ nativeBuildInputs = [ astropy-helpers ];
41+
42+ checkInputs = [ pytest pytest-astropy ];
43+
4144 # Disable automatic update of the astropy-helper module
4245 postPatch = ''
4346 substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
4447 '';
4548
49+ # Tests must be run in the build directory
50+ checkPhase = ''
51+ cd build/lib
52+ pytest
53+ '';
54+
4655 meta = with lib; {
4756 description = "The Astronomical Plotting Library in Python";
4857 homepage = http://aplpy.github.io;