python3Packages.astropy: unbreak

This commit is contained in:
Robert T. McGibbon 2020-12-27 19:16:28 -05:00
parent 7ef5a93fe1
commit 8df2e76984

View file

@ -1,5 +1,6 @@
{ lib
, fetchPypi
, setuptools_scm
, buildPythonPackage
, isPy3k
, cython
@ -8,11 +9,14 @@
, pytest
, pytest-astropy
, astropy-helpers
, astropy-extension-helpers
, pyerfa
}:
buildPythonPackage rec {
pname = "astropy";
version = "4.2";
format = "pyproject";
disabled = !isPy3k; # according to setup.py
@ -21,15 +25,12 @@ buildPythonPackage rec {
sha256 = "2c194f8a429b8399de64a413a06881ea49f0525cabaa2d78fc132b9e970adc6a";
};
nativeBuildInputs = [ astropy-helpers cython jinja2 ];
propagatedBuildInputs = [ numpy pytest ]; # yes it really has pytest in install_requires
nativeBuildInputs = [ setuptools_scm astropy-helpers astropy-extension-helpers cython jinja2 ];
propagatedBuildInputs = [ numpy pyerfa ];
checkInputs = [ pytest pytest-astropy ];
# Disable automatic update of the astropy-helper module
postPatch = ''
substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
preBuild = ''
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
'';
# Tests must be run from the build directory. astropy/samp tests
@ -42,15 +43,14 @@ buildPythonPackage rec {
'';
# 368 failed, 10889 passed, 978 skipped, 69 xfailed in 196.24s
# doCheck = false;
doCheck = false;
meta = {
meta = with lib; {
description = "Astronomy/Astrophysics library for Python";
homepage = "https://www.astropy.org";
license = lib.licenses.bsd3;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ kentjames ];
license = licenses.bsd3;
platforms = platforms.all;
maintainers = [ maintainers.kentjames ];
};
}