diff options
Diffstat (limited to 'pkgs/development/python-modules/astropy/default.nix')
-rw-r--r-- | pkgs/development/python-modules/astropy/default.nix | 64 |
1 files changed, 35 insertions, 29 deletions
diff --git a/pkgs/development/python-modules/astropy/default.nix b/pkgs/development/python-modules/astropy/default.nix index 889c69d5313bd..78f02e2870ce8 100644 --- a/pkgs/development/python-modules/astropy/default.nix +++ b/pkgs/development/python-modules/astropy/default.nix @@ -1,49 +1,55 @@ { lib , fetchPypi -, setuptools-scm , buildPythonPackage -, isPy3k +, pythonOlder + +# build time +, astropy-extension-helpers +, astropy-helpers , cython , jinja2 +, setuptools-scm + +# runtime , numpy -, pytest -, pytest-astropy -, astropy-helpers -, astropy-extension-helpers +, packaging , pyerfa +, pyyaml }: -buildPythonPackage rec { +let pname = "astropy"; - version = "4.3.1"; + version = "5.0"; +in +buildPythonPackage { + inherit pname version; format = "pyproject"; - disabled = !isPy3k; # according to setup.py + disabled = pythonOlder "3.8"; # according to setup.cfg src = fetchPypi { inherit pname version; - sha256 = "sha256-LTlRIjtOt/No/K2Mg0DSc3TF2OO2NaY2J1rNs481zVE="; + sha256 = "70203e151e13292586a817b4069ce1aad4643567aff38b1d191c173bc54f3927"; }; - nativeBuildInputs = [ setuptools-scm astropy-helpers astropy-extension-helpers cython jinja2 ]; - propagatedBuildInputs = [ numpy pyerfa ]; - checkInputs = [ pytest pytest-astropy ]; - - preBuild = '' - export SETUPTOOLS_SCM_PRETEND_VERSION="${version}" - ''; - - # Tests must be run from the build directory. astropy/samp tests - # require a network connection, so we ignore them. For some reason - # pytest --ignore does not work, so we delete the tests instead. - checkPhase = '' - cd build/lib.* - rm -f astropy/samp/tests/* - pytest - ''; - - # 368 failed, 10889 passed, 978 skipped, 69 xfailed in 196.24s - # doCheck = false; + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + astropy-extension-helpers + astropy-helpers + cython + jinja2 + setuptools-scm + ]; + + propagatedBuildInputs = [ + numpy + packaging + pyerfa + pyyaml + ]; + + # infinite recursion with pytest-astropy (pytest-astropy-header depends on astropy itself) doCheck = false; meta = with lib; { |