Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 52 lines 1.2 kB view raw
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 19 src = fetchPypi { 20 inherit pname version; 21 sha256 = "0xpqrl9h7sg55mql38xsfpbz9rxsm3mxfha1biqyly1gmxpmd47a"; 22 }; 23 24 disabled = !isPy3k; 25 26 propagatedBuildInputs = [ astropy requests keyring beautifulsoup4 html5lib ]; 27 28 nativeBuildInputs = [ astropy-helpers ]; 29 30 # Tests disabled until pytest-astropy has been updated to include pytest-astropy-header 31 doCheck = false; 32 checkInputs = [ pytest pytest-astropy ]; 33 34 # Disable automatic update of the astropy-helper module 35 postPatch = '' 36 substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False" 37 ''; 38 39 # Tests must be run in the build directory. The tests create files 40 # in $HOME/.astropy so we need to set HOME to $TMPDIR. 41 checkPhase = '' 42 cd build/lib 43 HOME=$TMPDIR pytest 44 ''; 45 46 meta = with pkgs.lib; { 47 description = "Functions and classes to access online data resources"; 48 homepage = "https://astroquery.readthedocs.io/"; 49 license = licenses.bsd3; 50 maintainers = [ maintainers.smaret ]; 51 }; 52}