2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
astropy,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchpatch,
|
|
|
|
fetchPypi,
|
|
|
|
matplotlib,
|
|
|
|
numpy,
|
|
|
|
pillow,
|
|
|
|
pyavm,
|
|
|
|
pyregion,
|
|
|
|
pytest-astropy,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
reproject,
|
|
|
|
scikit-image,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
shapely,
|
|
|
|
wheel,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aplpy";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "2.1.0";
|
2021-01-05 17:05:55 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
2022-04-15 01:41:22 +00:00
|
|
|
pname = "aplpy";
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit version;
|
2022-06-16 17:23:12 +00:00
|
|
|
hash = "sha256-KCdmBwQWt7IfHsjq7pWlbSISEpfQZDyt+SQSTDaUCV4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# Fix build with Astropy 6 and Python 3.12.
|
|
|
|
patches = [
|
|
|
|
# https://github.com/aplpy/aplpy/pull/496
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/aplpy/aplpy/commit/d232a4984bc6a83ec86dfdc3ab3bc1b05de44c48.patch";
|
|
|
|
hash = "sha256-jGUTzIrVdGNPy0BV8w46jzz045fDXBisiwIn90bn7oY=";
|
|
|
|
})
|
|
|
|
# https://github.com/aplpy/aplpy/pull/497
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/aplpy/aplpy/commit/468be394970b39f1aaa6debef51eb674e2dd86d8.patch";
|
|
|
|
hash = "sha256-/ovLrFOKb3RQ8TZSviuOV6EYNgz0gtrhVWZLFJBrzFg=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
nativeBuildInputs = [
|
2023-08-10 07:59:29 +00:00
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
wheel
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
astropy
|
|
|
|
matplotlib
|
2022-06-16 17:23:12 +00:00
|
|
|
numpy
|
|
|
|
pillow
|
2020-04-24 23:36:52 +00:00
|
|
|
pyavm
|
|
|
|
pyregion
|
2022-06-16 17:23:12 +00:00
|
|
|
reproject
|
2023-05-24 13:37:59 +00:00
|
|
|
scikit-image
|
2020-04-24 23:36:52 +00:00
|
|
|
shapely
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
pytest-astropy
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
preCheck = ''
|
|
|
|
OPENMP_EXPECTED=0
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "aplpy" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "The Astronomical Plotting Library in Python";
|
|
|
|
homepage = "http://aplpy.github.io";
|
|
|
|
license = licenses.mit;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ smaret ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|