python3Packages.astroquery: fix build and restore tests
This commit is contained in:
@@ -6,8 +6,12 @@
|
||||
, keyring
|
||||
, beautifulsoup4
|
||||
, html5lib
|
||||
, matplotlib
|
||||
, pillow
|
||||
, pytest
|
||||
, pytest-astropy
|
||||
, pytestCheckHook
|
||||
, pyvo
|
||||
, astropy-helpers
|
||||
, isPy3k
|
||||
}:
|
||||
@@ -24,21 +28,39 @@ buildPythonPackage rec {
|
||||
|
||||
disabled = !isPy3k;
|
||||
|
||||
propagatedBuildInputs = [ astropy requests keyring beautifulsoup4 html5lib ];
|
||||
propagatedBuildInputs = [
|
||||
astropy
|
||||
requests
|
||||
keyring
|
||||
beautifulsoup4
|
||||
html5lib
|
||||
pyvo
|
||||
];
|
||||
|
||||
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"
|
||||
'';
|
||||
|
||||
checkInputs = [
|
||||
matplotlib
|
||||
pillow
|
||||
pytest
|
||||
pytest-astropy
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
# Tests must be run in the build directory. The tests create files
|
||||
# in $HOME/.astropy so we need to set HOME to $TMPDIR.
|
||||
checkPhase = ''
|
||||
preCheck = ''
|
||||
export HOME=$TMPDIR
|
||||
cd build/lib
|
||||
HOME=$TMPDIR pytest
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "astroquery" ];
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "Functions and classes to access online data resources";
|
||||
homepage = "https://astroquery.readthedocs.io/";
|
||||
|
||||
Reference in New Issue
Block a user