1{ lib
2, astropy
3, buildPythonPackage
4, fetchPypi
5, importlib-resources
6, jmespath
7, jsonschema
8, numpy
9, packaging
10, pytest-astropy
11, pytestCheckHook
12, pythonOlder
13, pyyaml
14, semantic-version
15, setuptools-scm
16}:
17
18buildPythonPackage rec {
19 pname = "asdf";
20 version = "2.8.1";
21 disabled = pythonOlder "3.6";
22 format = "pyproject";
23
24 src = fetchPypi {
25 inherit pname version;
26 sha256 = "sha256-bp3fME3FTa5vcj7qUoUEGqvuI2uwSpI13zDcFgWvbJw=";
27 };
28
29 nativeBuildInputs = [ setuptools-scm ];
30
31 propagatedBuildInputs = [
32 jmespath
33 jsonschema
34 numpy
35 packaging
36 pyyaml
37 semantic-version
38 ] ++ lib.optionals (pythonOlder "3.9") [
39 importlib-resources
40 ];
41
42 checkInputs = [
43 pytest-astropy
44 astropy
45 pytestCheckHook
46 ];
47
48 preCheck = ''
49 export PY_IGNORE_IMPORTMISMATCH=1
50 '';
51
52 pythonImportsCheck = [ "asdf" ];
53
54 meta = with lib; {
55 description = "Python tools to handle ASDF files";
56 homepage = "https://github.com/spacetelescope/asdf";
57 license = licenses.bsd3;
58 maintainers = with maintainers; [ costrouc ];
59 };
60}