From 636eb402801ba5592ead7c9bfa6f802538866798 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 21 May 2022 22:28:46 +0200 Subject: [PATCH] python310Packages.reproject: 0.7.1 -> 0.8 --- .../python-modules/reproject/default.nix | 59 +++++++++++-------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/pkgs/development/python-modules/reproject/default.nix b/pkgs/development/python-modules/reproject/default.nix index 999c6882380..02a6b149eb0 100644 --- a/pkgs/development/python-modules/reproject/default.nix +++ b/pkgs/development/python-modules/reproject/default.nix @@ -1,50 +1,63 @@ { lib -, buildPythonPackage -, fetchPypi -, fetchpatch -, numpy , astropy +, astropy-extension-helpers , astropy-healpix , astropy-helpers -, astropy-extension-helpers -, scipy -, pytest +, buildPythonPackage +, cython +, fetchPypi +, numpy , pytest-astropy +, pytestCheckHook +, pythonOlder +, scipy , setuptools-scm -, cython }: buildPythonPackage rec { pname = "reproject"; - version = "0.7.1"; + version = "0.8"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "1jsc3ad518vyys5987fr1achq8qvnz8rm80zp5an9qxlwr4zmh4m"; + hash = "sha256-Z54sY3R6GViTvMLHrJclrAZ1dH4/9bzIrgqDd9nFbJY="; }; - patches = [ (fetchpatch { - # Can be removed in next release after 0.7.1 - # See https://github.com/astropy/reproject/issues/246 - url = "https://github.com/astropy/reproject/pull/243.patch"; - sha256 = "0dq3ii39hsrks0b9v306dlqf07dx0hqad8rwajmzw6rfda9m3c2a"; - }) + nativeBuildInputs = [ + astropy-extension-helpers + astropy-helpers + cython + setuptools-scm ]; - propagatedBuildInputs = [ numpy astropy astropy-healpix astropy-helpers scipy ]; - nativeBuildInputs = [ astropy-helpers cython astropy-extension-helpers setuptools-scm ]; - checkInputs = [ pytest pytest-astropy ]; + propagatedBuildInputs = [ + astropy + astropy-healpix + astropy-helpers + numpy + scipy + ]; - # Tests must be run in the build directory - checkPhase = '' + checkInputs = [ + pytest-astropy + pytestCheckHook + ]; + + preCheck = '' cd build/lib* - pytest ''; + pythonImportsCheck = [ + "reproject" + ]; + meta = with lib; { description = "Reproject astronomical images"; homepage = "https://reproject.readthedocs.io"; license = licenses.bsd3; - maintainers = [ maintainers.smaret ]; + maintainers = with maintainers; [ smaret ]; }; }