2021-05-04 03:45:54 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, GitPython
|
|
|
|
, jupyter-packaging
|
|
|
|
, jupyter_client
|
|
|
|
, jupyterlab
|
2020-12-08 02:19:14 +00:00
|
|
|
, markdown-it-py
|
2021-05-04 03:45:54 +01:00
|
|
|
, mdit-py-plugins
|
2018-12-20 11:18:30 +00:00
|
|
|
, nbformat
|
2021-05-04 03:45:54 +01:00
|
|
|
, notebook
|
|
|
|
, pytestCheckHook
|
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";
|
2021-05-04 03:45:54 +01:00
|
|
|
version = "1.11.2";
|
|
|
|
format = "pyproject";
|
2018-12-20 11:18:30 +00:00
|
|
|
|
2021-05-04 03:45:54 +01:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-12-08 02:19:14 +00:00
|
|
|
|
2021-05-04 03:45:54 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mwouts";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-S2SKAC2oT4VIVMMDbu/Puo87noAgnQs1hh88JphutA8=";
|
2018-12-20 11:18:30 +00:00
|
|
|
};
|
|
|
|
|
2021-05-04 03:45:54 +01:00
|
|
|
buildInputs = [ jupyter-packaging jupyterlab ];
|
2018-12-20 11:18:30 +00:00
|
|
|
propagatedBuildInputs = [
|
2020-12-08 02:19:14 +00:00
|
|
|
markdown-it-py
|
2021-05-04 03:45:54 +01:00
|
|
|
mdit-py-plugins
|
2018-12-20 11:18:30 +00:00
|
|
|
nbformat
|
2020-12-08 02:19:14 +00:00
|
|
|
pyyaml
|
2020-11-05 23:37:49 +00:00
|
|
|
toml
|
2020-12-08 02:19:14 +00:00
|
|
|
];
|
2019-08-03 01:35:05 +01:00
|
|
|
|
2018-12-20 11:18:30 +00:00
|
|
|
checkInputs = [
|
2021-05-04 03:45:54 +01:00
|
|
|
pytestCheckHook
|
|
|
|
GitPython
|
|
|
|
jupyter_client
|
|
|
|
notebook
|
2018-12-20 11:18:30 +00:00
|
|
|
];
|
2021-05-10 17:38:19 +01:00
|
|
|
# Tests that use a Jupyter notebook require $HOME to be writable.
|
|
|
|
HOME = "$TMPDIR";
|
|
|
|
# Pre-commit tests expect the source directory to be a Git repository.
|
2021-05-04 03:45:54 +01:00
|
|
|
pytestFlagsArray = [ "--ignore-glob='tests/test_pre_commit_*.py'" ];
|
|
|
|
pythonImportsCheck = [ "jupytext" "jupytext.cli" ];
|
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 ];
|
|
|
|
};
|
|
|
|
}
|