nixpkgs/pkgs/development/python-modules/jupytext/default.nix
2019-10-18 09:53:58 +02:00

40 lines
875 B
Nix

{ lib, buildPythonPackage, fetchPypi, isPy27
, mock
, nbformat
, pytest
, pyyaml
}:
buildPythonPackage rec {
pname = "jupytext";
version = "1.2.4";
src = fetchPypi {
inherit pname version;
sha256 = "490e1127033fceed5c49f7b1cde6aabffb059fe0a778a0e8b10d28d9eecef1f0";
};
propagatedBuildInputs = [
pyyaml
nbformat
] ++ lib.optionals isPy27 [ mock ]; # why they put it in install_requires, who knows
checkInputs = [
pytest
];
# requires test notebooks which are not shipped with the pypi release
# also, pypi no longer includes tests
doCheck = false;
checkPhase = ''
pytest
'';
meta = with lib; {
description = "Jupyter notebooks as Markdown documents, Julia, Python or R scripts";
homepage = https://github.com/mwouts/jupytext;
license = licenses.mit;
maintainers = with maintainers; [ timokau ];
};
}