3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/astropy/default.nix

57 lines
1.3 KiB
Nix
Raw Normal View History

2017-06-07 16:02:42 +01:00
{ lib
, fetchPypi
, setuptools-scm
2017-06-07 16:02:42 +01:00
, buildPythonPackage
, isPy3k
2020-11-20 21:00:02 +00:00
, cython
, jinja2
2017-06-07 16:02:42 +01:00
, numpy
2019-07-23 10:50:25 +01:00
, pytest
, pytest-astropy
, astropy-helpers
2020-12-28 00:16:28 +00:00
, astropy-extension-helpers
, pyerfa
2019-07-23 10:50:25 +01:00
}:
2017-06-07 16:02:42 +01:00
buildPythonPackage rec {
pname = "astropy";
2020-11-29 14:04:23 +00:00
version = "4.2";
2020-12-28 00:16:28 +00:00
format = "pyproject";
2017-06-07 16:02:42 +01:00
disabled = !isPy3k; # according to setup.py
2017-06-07 16:02:42 +01:00
src = fetchPypi {
inherit pname version;
2020-11-29 14:04:23 +00:00
sha256 = "2c194f8a429b8399de64a413a06881ea49f0525cabaa2d78fc132b9e970adc6a";
2017-06-07 16:02:42 +01:00
};
2017-09-06 16:15:30 +01:00
nativeBuildInputs = [ setuptools-scm astropy-helpers astropy-extension-helpers cython jinja2 ];
2020-12-28 00:16:28 +00:00
propagatedBuildInputs = [ numpy pyerfa ];
2019-07-23 10:50:25 +01:00
checkInputs = [ pytest pytest-astropy ];
2020-12-28 00:16:28 +00:00
preBuild = ''
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
2019-07-23 10:50:25 +01:00
'';
# 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
'';
2017-06-07 16:02:42 +01:00
# 368 failed, 10889 passed, 978 skipped, 69 xfailed in 196.24s
2020-12-28 00:16:28 +00:00
# doCheck = false;
doCheck = false;
2020-12-28 00:16:28 +00:00
meta = with lib; {
2017-06-07 16:02:42 +01:00
description = "Astronomy/Astrophysics library for Python";
homepage = "https://www.astropy.org";
2020-12-28 00:16:28 +00:00
license = licenses.bsd3;
platforms = platforms.all;
maintainers = [ maintainers.kentjames ];
2017-06-07 16:02:42 +01:00
};
}