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
|
2020-11-05 23:37:49 +00:00
|
|
|
, toml
|
2018-12-20 11:18:30 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jupytext";
|
2020-08-16 18:31:06 +01:00
|
|
|
version = "1.5.2";
|
2018-12-20 11:18:30 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-16 18:31:06 +01:00
|
|
|
sha256 = "1cebc9f5975b4c08db3de6d7d61b35f8c33a24cf2c8c04eee7b8a7aab8ddc39b";
|
2018-12-20 11:18:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyyaml
|
|
|
|
nbformat
|
2020-11-05 23:37:49 +00:00
|
|
|
toml
|
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";
|
2020-03-03 09:05:42 +00:00
|
|
|
homepage = "https://github.com/mwouts/jupytext";
|
2018-12-20 11:18:30 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ timokau ];
|
|
|
|
};
|
|
|
|
}
|