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