nixpkgs-suyu/pkgs/development/python-modules/asdf/default.nix
2020-08-29 10:22:12 -07:00

57 lines
1,001 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pytest-astropy
, semantic-version
, pyyaml
, jsonschema
, six
, numpy
, isPy27
, astropy
, setuptools_scm
, setuptools
}:
buildPythonPackage rec {
pname = "asdf";
version = "2.7.1";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "4ba2e31cb24b974a10dfae3edee23db2e6bea2d00608604d062366aa3af6e81a";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace "semantic_version>=2.3.1,<=2.6.0" "semantic_version>=2.3.1" \
--replace "doctest_plus = enabled" ""
'';
checkInputs = [
pytest-astropy
astropy
];
propagatedBuildInputs = [
semantic-version
pyyaml
jsonschema
six
numpy
setuptools_scm
setuptools
];
checkPhase = ''
pytest
'';
meta = with lib; {
description = "Python tools to handle ASDF files";
homepage = "https://github.com/spacetelescope/asdf";
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}