nixpkgs/pkgs/development/python-modules/asdf/default.nix
2020-08-16 19:30:50 +02:00

58 lines
1001 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.0";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "687d741f19db663b769eb188458dafd4fe5cc10201640ffed3210c7f138f15d0";
};
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 ];
};
}