anchor.diff:      shapely
     ];
   
  +  nativeBuildInputs = [ astropy-helpers ];
  +
  +  checkInputs = [ pytest pytest-astropy ];
  +
     # Disable automatic update of the astropy-helper module
     postPatch = ''
       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; {
  
positive.code: , pillow
  , scikitimage
  , shapely
  }:
  
  buildPythonPackage rec {
    pname = "aplpy";
    version = "2.0.3";
  
    doCheck = false; # tests require pytest-astropy
  
    src = fetchPypi {
      pname = "APLpy";
  
negative.code:   propagatedBuildInputs = [
      numpy
      astropy
      matplotlib
      reproject
      pyavm
  