2024-06-24 18:47:55 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
astropy,
|
|
|
|
bottleneck,
|
|
|
|
buildPythonPackage,
|
|
|
|
cython,
|
|
|
|
extension-helpers,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gwcs,
|
|
|
|
matplotlib,
|
|
|
|
numpy,
|
|
|
|
pythonOlder,
|
|
|
|
rasterio,
|
|
|
|
scikit-image,
|
|
|
|
scikit-learn,
|
|
|
|
scipy,
|
|
|
|
setuptools-scm,
|
|
|
|
setuptools,
|
|
|
|
shapely,
|
|
|
|
tqdm,
|
|
|
|
wheel,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "photutils";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "1.13.0";
|
2024-06-24 18:47:55 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.10";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "astropy";
|
|
|
|
repo = "photutils";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-J1i1H7AfQdiUIyBpgJK3dkH6C8MoEOwug4YQP+NEPbk=";
|
2024-06-24 18:47:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail "'numpy>=2.0.0rc1'," ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
extension-helpers
|
|
|
|
numpy
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
astropy
|
|
|
|
numpy
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
all = [
|
|
|
|
bottleneck
|
|
|
|
gwcs
|
|
|
|
matplotlib
|
|
|
|
rasterio
|
|
|
|
scikit-image
|
|
|
|
scikit-learn
|
|
|
|
scipy
|
|
|
|
shapely
|
|
|
|
tqdm
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
# With 1.12.0 tests have issues importing modules
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "photutils" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Astropy package for source detection and photometry";
|
|
|
|
homepage = "https://github.com/astropy/photutils";
|
|
|
|
changelog = "https://github.com/astropy/photutils/blob/${version}/CHANGES.rst";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|