nixpkgs/pkgs/development/python-modules/reproject/default.nix

50 lines
1.0 KiB
Nix
Raw Normal View History

2019-02-13 15:15:23 +00:00
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
2019-02-13 15:15:23 +00:00
, numpy
, astropy
, astropy-healpix
, astropy-helpers
, extension-helpers
2019-02-13 15:15:23 +00:00
, scipy
2019-12-03 13:25:17 +00:00
, pytest
, pytest-astropy
, setuptools_scm
2019-12-03 13:25:17 +00:00
, cython
2019-02-13 15:15:23 +00:00
}:
buildPythonPackage rec {
pname = "reproject";
version = "0.7.1";
2019-02-13 15:15:23 +00:00
src = fetchPypi {
inherit pname version;
sha256 = "1jsc3ad518vyys5987fr1achq8qvnz8rm80zp5an9qxlwr4zmh4m";
2019-02-13 15:15:23 +00:00
};
propagatedBuildInputs = [ numpy astropy astropy-healpix astropy-helpers scipy ];
nativeBuildInputs = [ astropy-helpers cython extension-helpers setuptools_scm ];
2019-02-13 15:15:23 +00:00
# Disable automatic update of the astropy-helper module
postPatch = ''
substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
'';
2019-12-03 13:25:17 +00:00
checkInputs = [ pytest pytest-astropy ];
# Tests must be run in the build directory
checkPhase = ''
cd build/lib*
pytest
'';
2019-02-13 15:15:23 +00:00
meta = with lib; {
description = "Reproject astronomical images";
homepage = "https://reproject.readthedocs.io";
2019-02-13 15:15:23 +00:00
license = licenses.bsd3;
maintainers = [ maintainers.smaret ];
};
}