pythonPackages.aplpy: add checkPhase

This commit is contained in:
Sébastien Maret 2019-07-23 12:50:21 +02:00 committed by Frederik Rietdijk
parent 723382b0bf
commit ffd71594f6

View File

@ -11,14 +11,14 @@
, pillow , pillow
, scikitimage , scikitimage
, shapely , shapely
, pytest
, pytest-astropy
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "aplpy"; pname = "aplpy";
version = "2.0.3"; version = "2.0.3";
doCheck = false; # tests require pytest-astropy
src = fetchPypi { src = fetchPypi {
pname = "APLpy"; pname = "APLpy";
inherit version; inherit version;
@ -28,7 +28,6 @@ buildPythonPackage rec {
propagatedBuildInputs = [ propagatedBuildInputs = [
numpy numpy
astropy astropy
astropy-helpers
matplotlib matplotlib
reproject reproject
pyavm pyavm
@ -38,11 +37,21 @@ buildPythonPackage rec {
shapely shapely
]; ];
nativeBuildInputs = [ astropy-helpers ];
checkInputs = [ pytest pytest-astropy ];
# Disable automatic update of the astropy-helper module # Disable automatic update of the astropy-helper module
postPatch = '' postPatch = ''
substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False" substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
''; '';
# Tests must be run in the build directory
checkPhase = ''
cd build/lib
pytest
'';
meta = with lib; { meta = with lib; {
description = "The Astronomical Plotting Library in Python"; description = "The Astronomical Plotting Library in Python";
homepage = http://aplpy.github.io; homepage = http://aplpy.github.io;