mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-09 07:13:03 +00:00
a5e82af9d8
Tests are disabled until pytest-astropy is updated with pytest-astropy-header.
53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
{ pkgs
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, astropy
|
|
, requests
|
|
, keyring
|
|
, beautifulsoup4
|
|
, html5lib
|
|
, pytest
|
|
, pytest-astropy
|
|
, astropy-helpers
|
|
, isPy3k
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "astroquery";
|
|
version = "0.4";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "1ddwnj9vpvxkrfb45c4pwv5f5za9kn2q0040dpw2ymj2bwlpl61h";
|
|
};
|
|
|
|
disabled = !isPy3k;
|
|
|
|
propagatedBuildInputs = [ astropy requests keyring beautifulsoup4 html5lib ];
|
|
|
|
nativeBuildInputs = [ astropy-helpers ];
|
|
|
|
# Tests disabled until pytest-astropy has been updated to include pytest-astropy-header
|
|
doCheck = false;
|
|
checkInputs = [ pytest pytest-astropy ];
|
|
|
|
# Disable automatic update of the astropy-helper module
|
|
postPatch = ''
|
|
substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
|
|
'';
|
|
|
|
# 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
|
|
'';
|
|
|
|
meta = with pkgs.lib; {
|
|
description = "Functions and classes to access online data resources";
|
|
homepage = "https://astroquery.readthedocs.io/";
|
|
license = licenses.bsd3;
|
|
maintainers = [ maintainers.smaret ];
|
|
};
|
|
}
|