2018-11-15 23:11:41 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
astropy,
|
|
|
|
requests,
|
|
|
|
keyring,
|
|
|
|
beautifulsoup4,
|
|
|
|
html5lib,
|
2022-04-09 14:40:19 +00:00
|
|
|
matplotlib,
|
|
|
|
pillow,
|
2019-07-23 16:44:54 +00:00
|
|
|
pytest,
|
|
|
|
pytest-astropy,
|
2024-05-09 11:33:50 +00:00
|
|
|
pytest-dependency,
|
|
|
|
pytest-rerunfailures,
|
2022-04-09 14:40:19 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
pyvo,
|
2019-07-23 16:44:54 +00:00
|
|
|
astropy-helpers,
|
2022-10-12 15:00:24 +00:00
|
|
|
setuptools,
|
2020-02-25 12:13:10 +00:00
|
|
|
isPy3k,
|
2018-11-15 23:11:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "astroquery";
|
2024-04-18 19:47:46 +00:00
|
|
|
version = "0.4.7";
|
2020-12-28 18:08:50 +00:00
|
|
|
format = "pyproject";
|
2018-11-15 23:11:41 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-18 19:47:46 +00:00
|
|
|
hash = "sha256-BH+6ywpPrsTNtiZ16RnCRMHDXmYQRPy7bJqTMzF0fsk=";
|
2018-11-15 23:11:41 +00:00
|
|
|
};
|
|
|
|
|
2020-02-25 12:13:10 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2022-04-09 14:40:19 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
astropy
|
|
|
|
requests
|
|
|
|
keyring
|
|
|
|
beautifulsoup4
|
|
|
|
html5lib
|
|
|
|
pyvo
|
|
|
|
];
|
2018-11-15 23:11:41 +00:00
|
|
|
|
2022-10-12 15:00:24 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
astropy-helpers
|
|
|
|
setuptools
|
|
|
|
];
|
2019-07-23 16:44:54 +00:00
|
|
|
|
2022-04-09 14:40:19 +00:00
|
|
|
# Disable automatic update of the astropy-helper module
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
|
|
|
|
'';
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2024-05-09 11:33:50 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
2022-04-09 14:40:19 +00:00
|
|
|
matplotlib
|
|
|
|
pillow
|
|
|
|
pytest
|
|
|
|
pytest-astropy
|
2024-05-09 11:33:50 +00:00
|
|
|
pytest-dependency
|
|
|
|
pytest-rerunfailures
|
2022-04-09 14:40:19 +00:00
|
|
|
];
|
2019-07-23 16:44:54 +00:00
|
|
|
|
2023-09-24 16:13:10 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
|
|
|
|
"-W"
|
|
|
|
"ignore::DeprecationWarning"
|
|
|
|
];
|
|
|
|
|
2019-07-23 16:44:54 +00:00
|
|
|
# Tests must be run in the build directory. The tests create files
|
|
|
|
# in $HOME/.astropy so we need to set HOME to $TMPDIR.
|
2022-04-09 14:40:19 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
2019-07-23 16:44:54 +00:00
|
|
|
cd build/lib
|
|
|
|
'';
|
|
|
|
|
2022-04-09 14:40:19 +00:00
|
|
|
pythonImportsCheck = [ "astroquery" ];
|
|
|
|
|
2018-11-15 23:11:41 +00:00
|
|
|
meta = with pkgs.lib; {
|
|
|
|
description = "Functions and classes to access online data resources";
|
|
|
|
homepage = "https://astroquery.readthedocs.io/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.smaret ];
|
|
|
|
};
|
|
|
|
}
|