2018-11-15 23:11:41 +00:00
|
|
|
{ pkgs
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, astropy
|
|
|
|
, requests
|
|
|
|
, keyring
|
|
|
|
, beautifulsoup4
|
|
|
|
, html5lib
|
2019-07-23 16:44:54 +00:00
|
|
|
, pytest
|
|
|
|
, pytest-astropy
|
|
|
|
, astropy-helpers
|
2020-02-25 12:13:10 +00:00
|
|
|
, isPy3k
|
2018-11-15 23:11:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "astroquery";
|
2020-07-26 01:21:43 +00:00
|
|
|
version = "0.4.1";
|
2020-12-28 18:08:50 +00:00
|
|
|
format = "pyproject";
|
2018-11-15 23:11:41 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-07-26 01:21:43 +00:00
|
|
|
sha256 = "0xpqrl9h7sg55mql38xsfpbz9rxsm3mxfha1biqyly1gmxpmd47a";
|
2018-11-15 23:11:41 +00:00
|
|
|
};
|
|
|
|
|
2020-02-25 12:13:10 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2018-11-15 23:11:41 +00:00
|
|
|
propagatedBuildInputs = [ astropy requests keyring beautifulsoup4 html5lib ];
|
|
|
|
|
2019-07-23 16:44:54 +00:00
|
|
|
nativeBuildInputs = [ astropy-helpers ];
|
|
|
|
|
2020-02-25 12:13:10 +00:00
|
|
|
# Tests disabled until pytest-astropy has been updated to include pytest-astropy-header
|
|
|
|
doCheck = false;
|
2019-07-23 16:44:54 +00:00
|
|
|
checkInputs = [ pytest pytest-astropy ];
|
|
|
|
|
|
|
|
# Tests must be run in the build directory. The tests create files
|
|
|
|
# in $HOME/.astropy so we need to set HOME to $TMPDIR.
|
|
|
|
checkPhase = ''
|
|
|
|
cd build/lib
|
|
|
|
HOME=$TMPDIR pytest
|
|
|
|
'';
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|