2019-08-03 01:35:05 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPy27
|
2018-12-20 11:18:30 +00:00
|
|
|
, mock
|
|
|
|
, nbformat
|
|
|
|
, pytest
|
2019-08-03 01:35:05 +01:00
|
|
|
, pyyaml
|
2018-12-20 11:18:30 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jupytext";
|
2019-12-19 19:31:14 +00:00
|
|
|
version = "1.3.0";
|
2018-12-20 11:18:30 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-12-19 19:31:14 +00:00
|
|
|
sha256 = "e0b23c566dd3cf3a3a3bdcd880383d7fab79a5bbf0da6e5396818ac23a1ecf8a";
|
2018-12-20 11:18:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyyaml
|
|
|
|
nbformat
|
2019-08-03 01:35:05 +01:00
|
|
|
] ++ lib.optionals isPy27 [ mock ]; # why they put it in install_requires, who knows
|
|
|
|
|
2018-12-20 11:18:30 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
# requires test notebooks which are not shipped with the pypi release
|
2019-08-03 01:35:05 +01:00
|
|
|
# also, pypi no longer includes tests
|
2018-12-20 11:18:30 +00:00
|
|
|
doCheck = false;
|
|
|
|
checkPhase = ''
|
2019-08-03 01:35:05 +01:00
|
|
|
pytest
|
2018-12-20 11:18:30 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|