2019-07-15 17:17:51 +01:00
|
|
|
{ lib
|
2021-03-21 09:48:09 +00:00
|
|
|
, astropy
|
2019-07-15 17:17:51 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-07-04 23:30:14 +01:00
|
|
|
, importlib-resources
|
|
|
|
, jmespath
|
2019-07-15 17:17:51 +01:00
|
|
|
, jsonschema
|
|
|
|
, numpy
|
2021-03-21 09:48:09 +00:00
|
|
|
, packaging
|
|
|
|
, pytest-astropy
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
|
|
|
, semantic-version
|
|
|
|
, setuptools-scm
|
2019-07-15 17:17:51 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asdf";
|
2021-07-04 23:30:14 +01:00
|
|
|
version = "2.8.1";
|
2021-03-21 09:48:09 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-12-28 18:33:33 +00:00
|
|
|
format = "pyproject";
|
2019-07-15 17:17:51 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-07-04 23:30:14 +01:00
|
|
|
sha256 = "sha256-bp3fME3FTa5vcj7qUoUEGqvuI2uwSpI13zDcFgWvbJw=";
|
2019-07-15 17:17:51 +01:00
|
|
|
};
|
|
|
|
|
2021-03-21 09:48:09 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2019-07-15 17:17:51 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-07-04 23:30:14 +01:00
|
|
|
jmespath
|
2019-07-15 17:17:51 +01:00
|
|
|
jsonschema
|
|
|
|
numpy
|
2021-03-21 09:48:09 +00:00
|
|
|
packaging
|
|
|
|
pyyaml
|
|
|
|
semantic-version
|
2021-07-04 23:30:14 +01:00
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
importlib-resources
|
2019-07-15 17:17:51 +01:00
|
|
|
];
|
|
|
|
|
2021-03-21 09:48:09 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest-astropy
|
|
|
|
astropy
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export PY_IGNORE_IMPORTMISMATCH=1
|
2019-07-15 17:17:51 +01:00
|
|
|
'';
|
|
|
|
|
2021-03-21 09:48:09 +00:00
|
|
|
pythonImportsCheck = [ "asdf" ];
|
|
|
|
|
2019-07-15 17:17:51 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python tools to handle ASDF files";
|
2020-03-03 02:26:35 +00:00
|
|
|
homepage = "https://github.com/spacetelescope/asdf";
|
2019-07-15 17:17:51 +01:00
|
|
|
license = licenses.bsd3;
|
2021-07-04 23:30:14 +01:00
|
|
|
maintainers = with maintainers; [ costrouc ];
|
2019-07-15 17:17:51 +01:00
|
|
|
};
|
|
|
|
}
|