1{ pkgs 2, buildPythonPackage 3, fetchPypi 4, astropy 5, requests 6, keyring 7, beautifulsoup4 8, html5lib 9, pytest 10, pytest-astropy 11, astropy-helpers 12, isPy3k 13}: 14 15buildPythonPackage rec { 16 pname = "astroquery"; 17 version = "0.4.1"; 18 format = "pyproject"; 19 20 src = fetchPypi { 21 inherit pname version; 22 sha256 = "0xpqrl9h7sg55mql38xsfpbz9rxsm3mxfha1biqyly1gmxpmd47a"; 23 }; 24 25 disabled = !isPy3k; 26 27 propagatedBuildInputs = [ astropy requests keyring beautifulsoup4 html5lib ]; 28 29 nativeBuildInputs = [ astropy-helpers ]; 30 31 # Tests disabled until pytest-astropy has been updated to include pytest-astropy-header 32 doCheck = false; 33 checkInputs = [ pytest pytest-astropy ]; 34 35 # Tests must be run in the build directory. The tests create files 36 # in $HOME/.astropy so we need to set HOME to $TMPDIR. 37 checkPhase = '' 38 cd build/lib 39 HOME=$TMPDIR pytest 40 ''; 41 42 meta = with pkgs.lib; { 43 description = "Functions and classes to access online data resources"; 44 homepage = "https://astroquery.readthedocs.io/"; 45 license = licenses.bsd3; 46 maintainers = [ maintainers.smaret ]; 47 }; 48}