diff --git a/pkgs/development/python-modules/reproject/default.nix b/pkgs/development/python-modules/reproject/default.nix index 46f718077684..b4124166062e 100644 --- a/pkgs/development/python-modules/reproject/default.nix +++ b/pkgs/development/python-modules/reproject/default.nix @@ -1,21 +1,26 @@ { lib, + asdf, astropy, - astropy-extension-helpers, astropy-healpix, buildPythonPackage, - cloudpickle, cython, dask, extension-helpers, - fetchPypi, + fetchFromGitHub, fsspec, + gwcs, numpy, + pillow, + pyavm, pytest-astropy, + pytest-xdist, pytestCheckHook, - pythonOlder, scipy, + setuptools, setuptools-scm, + shapely, + tqdm, zarr, }: @@ -24,48 +29,42 @@ buildPythonPackage rec { version = "0.15.0"; pyproject = true; - disabled = pythonOlder "3.10"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-l9pmxtXIGnl8T8fCsUp/5y3kReg3MXdaN0i2rpcEqE4="; + src = fetchFromGitHub { + owner = "astropy"; + repo = "reproject"; + tag = "v${version}"; + hash = "sha256-gv5LOxXTNdHSx4Q4ydi/QBHhc7/E/DXJD7WuPBAH0dE="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace "cython==" "cython>=" - ''; - - nativeBuildInputs = [ - astropy-extension-helpers - cython - numpy + build-system = [ + setuptools setuptools-scm + cython + extension-helpers + numpy ]; - propagatedBuildInputs = [ + dependencies = [ astropy astropy-healpix - cloudpickle dask - extension-helpers fsspec numpy + pillow + pyavm scipy zarr ] ++ dask.optional-dependencies.array; nativeCheckInputs = [ - pytest-astropy pytestCheckHook - ]; - - pytestFlags = [ - # Avoid failure due to user warning: Distutils was imported before Setuptools - "-pno:warnings" - # prevent "'filterwarnings' not found in `markers` configuration option" error - "-omarkers=filterwarnings" + pytest-astropy + pytest-xdist + asdf + gwcs + shapely + tqdm ]; enabledTestPaths = [ @@ -79,12 +78,12 @@ buildPythonPackage rec { pythonImportsCheck = [ "reproject" ]; - meta = with lib; { + meta = { description = "Reproject astronomical images"; downloadPage = "https://github.com/astropy/reproject"; homepage = "https://reproject.readthedocs.io"; - changelog = "https://github.com/astropy/reproject/releases/tag/v${version}"; - license = licenses.bsd3; - maintainers = with maintainers; [ smaret ]; + changelog = "https://github.com/astropy/reproject/releases/tag/${src.tag}"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ smaret ]; }; }