Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 astropy, 4 bottleneck, 5 buildPythonPackage, 6 cython, 7 extension-helpers, 8 fetchFromGitHub, 9 gwcs, 10 matplotlib, 11 numpy, 12 photutils, 13 pythonOlder, 14 rasterio, 15 scikit-image, 16 scikit-learn, 17 scipy, 18 setuptools-scm, 19 setuptools, 20 shapely, 21 tomli, 22 tqdm, 23 python, 24 wheel, 25}: 26 27buildPythonPackage rec { 28 pname = "photutils"; 29 version = "1.13.0"; 30 pyproject = true; 31 32 disabled = pythonOlder "3.10"; 33 34 src = fetchFromGitHub { 35 owner = "astropy"; 36 repo = "photutils"; 37 rev = "refs/tags/${version}"; 38 hash = "sha256-J1i1H7AfQdiUIyBpgJK3dkH6C8MoEOwug4YQP+NEPbk="; 39 }; 40 41 postPatch = '' 42 substituteInPlace pyproject.toml \ 43 --replace-fail "'numpy>=2.0.0rc1'," "" 44 ''; 45 46 build-system = [ 47 setuptools 48 setuptools-scm 49 wheel 50 ]; 51 52 nativeBuildInputs = [ 53 cython 54 extension-helpers 55 numpy 56 ]; 57 58 dependencies = [ 59 astropy 60 numpy 61 ]; 62 63 passthru.optional-dependencies = { 64 all = [ 65 bottleneck 66 gwcs 67 matplotlib 68 rasterio 69 scikit-image 70 scikit-learn 71 scipy 72 shapely 73 tqdm 74 ]; 75 }; 76 77 # With 1.12.0 tests have issues importing modules 78 doCheck = false; 79 80 pythonImportsCheck = [ "photutils" ]; 81 82 meta = with lib; { 83 description = "Astropy package for source detection and photometry"; 84 homepage = "https://github.com/astropy/photutils"; 85 changelog = "https://github.com/astropy/photutils/blob/${version}/CHANGES.rst"; 86 license = licenses.bsd3; 87 maintainers = with maintainers; [ fab ]; 88 }; 89}