Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 pkgs, 3 buildPythonPackage, 4 fetchPypi, 5 astropy, 6 requests, 7 keyring, 8 beautifulsoup4, 9 html5lib, 10 matplotlib, 11 pillow, 12 pytest, 13 pytest-astropy, 14 pytest-dependency, 15 pytest-rerunfailures, 16 pytestCheckHook, 17 pyvo, 18 astropy-helpers, 19 setuptools, 20 isPy3k, 21}: 22 23buildPythonPackage rec { 24 pname = "astroquery"; 25 version = "0.4.10"; 26 format = "pyproject"; 27 28 src = fetchPypi { 29 inherit pname version; 30 hash = "sha256-6s2R6do3jmQXQPvDEjhQ2qg7oJJqb/9MQMy/XcbVpAY="; 31 }; 32 33 disabled = !isPy3k; 34 35 propagatedBuildInputs = [ 36 astropy 37 requests 38 keyring 39 beautifulsoup4 40 html5lib 41 pyvo 42 ]; 43 44 nativeBuildInputs = [ 45 astropy-helpers 46 setuptools 47 ]; 48 49 # Disable automatic update of the astropy-helper module 50 postPatch = '' 51 substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False" 52 ''; 53 54 nativeCheckInputs = [ pytestCheckHook ]; 55 56 checkInputs = [ 57 matplotlib 58 pillow 59 pytest 60 pytest-astropy 61 pytest-dependency 62 pytest-rerunfailures 63 ]; 64 65 pytestFlags = [ 66 # DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13 67 "-Wignore::DeprecationWarning" 68 ]; 69 70 # Tests must be run in the build directory. The tests create files 71 # in $HOME/.astropy so we need to set HOME to $TMPDIR. 72 preCheck = '' 73 export HOME=$TMPDIR 74 cd build/lib 75 ''; 76 77 pythonImportsCheck = [ "astroquery" ]; 78 79 meta = with pkgs.lib; { 80 description = "Functions and classes to access online data resources"; 81 homepage = "https://astroquery.readthedocs.io/"; 82 license = licenses.bsd3; 83 maintainers = [ maintainers.smaret ]; 84 }; 85}