python3Packages.astropy: propagate pyyaml and packaging
and some refactoring.
This commit is contained in:
parent
dd1ff973f9
commit
7e0f3eac68
|
@ -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 = "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 = "70203e151e13292586a817b4069ce1aad4643567aff38b1d191c173bc54f3927";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools-scm astropy-helpers astropy-extension-helpers cython jinja2 ];
|
||||
propagatedBuildInputs = [ numpy pyerfa ];
|
||||
checkInputs = [ pytest pytest-astropy ];
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
preBuild = ''
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
|
||||
'';
|
||||
nativeBuildInputs = [
|
||||
astropy-extension-helpers
|
||||
astropy-helpers
|
||||
cython
|
||||
jinja2
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
# 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
|
||||
'';
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
packaging
|
||||
pyerfa
|
||||
pyyaml
|
||||
];
|
||||
|
||||
# 368 failed, 10889 passed, 978 skipped, 69 xfailed in 196.24s
|
||||
# doCheck = false;
|
||||
# infinite recursion with pytest-astropy (pytest-astropy-header depends on astropy itself)
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue