Skip to content

Commit

Permalink
Merge pull request #179773 from marsam/add-jupyter-book
Browse files Browse the repository at this point in the history
python310Packages.jupyter-book: init at 0.13.0

Closes #132686
  • Loading branch information
marsam authored Jul 3, 2022
2 parents db43c2a + a584258 commit 19d31fc
Show file tree
Hide file tree
Showing 14 changed files with 520 additions and 2 deletions.
80 changes: 80 additions & 0 deletions pkgs/development/python-modules/jupyter-book/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, flit-core
, click
, docutils
, jinja2
, jsonschema
, linkify-it-py
, myst-nb
, pyyaml
, sphinx
, sphinx-comments
, sphinx-copybutton
, sphinx-external-toc
, sphinx-jupyterbook-latex
, sphinx-design
, sphinx-thebe
, sphinx-book-theme
, sphinx-togglebutton
, sphinxcontrib-bibtex
, sphinx-multitoc-numbering
}:

buildPythonPackage rec {
pname = "jupyter-book";
version = "0.13.0";

format = "flit";

disabled = pythonOlder "3.7";

src = fetchPypi {
inherit pname version;
sha256 = "0a956677e7bbee630dd66641c09a84091277887d6dcdd381a676f00fa9de2074";
};

postPatch = ''
substituteInPlace pyproject.toml \
--replace "jsonschema<4" "jsonschema" \
--replace "sphinx-external-toc~=0.2.3" "sphinx-external-toc" \
--replace "myst-nb~=0.13.1" "myst-nb" \
--replace "docutils>=0.15,<0.18" "docutils" \
--replace "sphinx-design~=0.1.0" "sphinx-design" \
--replace "linkify-it-py~=1.0.1" "linkify-it-py"
'';

nativeBuildInputs = [ flit-core ];

propagatedBuildInputs = [
click
docutils
jinja2
jsonschema
linkify-it-py
myst-nb
pyyaml
sphinx
sphinx-comments
sphinx-copybutton
sphinx-external-toc
sphinx-jupyterbook-latex
sphinx-design
sphinx-thebe
sphinx-book-theme
sphinx-togglebutton
sphinxcontrib-bibtex
sphinx-multitoc-numbering
];

pythonImportsCheck = [ "jupyter_book" ];

meta = with lib; {
description = "Build a book with Jupyter Notebooks and Sphinx";
homepage = "https://executablebooks.org/";
license = licenses.bsd3;
maintainers = with maintainers; [ marsam ];
};
}
50 changes: 50 additions & 0 deletions pkgs/development/python-modules/jupyter-cache/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{ lib
, buildPythonPackage
, fetchPypi
, attrs
, click
, importlib-metadata
, nbclient
, nbformat
, pyyaml
, sqlalchemy
, tabulate
, pythonOlder
}:

buildPythonPackage rec {
pname = "jupyter-cache";
version = "0.5.0";

disabled = pythonOlder "3.7";

src = fetchPypi {
inherit pname version;
sha256 = "87408030a4c8c14fe3f8fe62e6ceeb24c84e544c7ced20bfee45968053d07801";
};

postPatch = ''
substituteInPlace setup.cfg \
--replace "nbclient>=0.2,<0.6" "nbclient"
'';

propagatedBuildInputs = [
attrs
click
importlib-metadata
nbclient
nbformat
pyyaml
sqlalchemy
tabulate
];

pythonImportsCheck = [ "jupyter_cache" ];

meta = with lib; {
description = "A defined interface for working with a cache of jupyter notebooks";
homepage = "https://github.com/executablebooks/jupyter-cache";
license = licenses.mit;
maintainers = with maintainers; [ marsam ];
};
}
56 changes: 56 additions & 0 deletions pkgs/development/python-modules/myst-nb/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, flit-core
, importlib-metadata
, ipython
, jupyter-cache
, nbclient
, myst-parser
, nbformat
, pyyaml
, sphinx
, sphinx-togglebutton
, typing-extensions
, ipykernel
}:

buildPythonPackage rec {
pname = "myst-nb";
version = "0.16.0";

format = "flit";

disabled = pythonOlder "3.7";

src = fetchPypi {
inherit pname version;
sha256 = "9c7ab37929da72f78569a37bcccbc5d49fd679fd7935bf6c9fa36365eb58783a";
};

nativeBuildInputs = [ flit-core ];

propagatedBuildInputs = [
importlib-metadata
ipython
jupyter-cache
nbclient
myst-parser
nbformat
pyyaml
sphinx
sphinx-togglebutton
typing-extensions
ipykernel
];

pythonImportsCheck = [ "myst_nb" ];

meta = with lib; {
description = "A Jupyter Notebook Sphinx reader built on top of the MyST markdown parser";
homepage = "https://github.com/executablebooks/myst-nb";
license = licenses.mit;
maintainers = with maintainers; [ marsam ];
};
}
42 changes: 42 additions & 0 deletions pkgs/development/python-modules/pydata-sphinx-theme/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, sphinx
, beautifulsoup4
, docutils
, packaging
}:

buildPythonPackage rec {
pname = "pydata-sphinx-theme";
version = "0.8.1";

format = "wheel";

disabled = pythonOlder "3.7";

src = fetchPypi {
inherit version format;
dist = "py3";
python = "py3";
pname = "pydata_sphinx_theme";
sha256 = "af2c99cb0b43d95247b1563860942ba75d7f1596360594fce510caaf8c4fcc16";
};

propagatedBuildInputs = [
sphinx
beautifulsoup4
docutils
packaging
];

pythonImportsCheck = [ "pydata_sphinx_theme" ];

meta = with lib; {
description = "Bootstrap-based Sphinx theme from the PyData community";
homepage = "https://github.com/pydata/pydata-sphinx-theme";
license = licenses.bsd3;
maintainers = with maintainers; [ marsam ];
};
}
9 changes: 8 additions & 1 deletion pkgs/development/python-modules/skia-pathops/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ lib
, stdenv
, buildPythonPackage
, cython
, ninja
Expand All @@ -7,6 +8,9 @@
, fetchPypi
, gn
, pytestCheckHook
, xcodebuild
, ApplicationServices
, OpenGL
}:

buildPythonPackage rec {
Expand All @@ -26,7 +30,10 @@ buildPythonPackage rec {
'build_cmd = [sys.executable, build_skia_py, "--no-fetch-gn", "--no-virtualenv", "--gn-path", "${gn}/bin/gn", build_dir]'
'';

nativeBuildInputs = [ cython ninja setuptools-scm ];
nativeBuildInputs = [ cython ninja setuptools-scm ]
++ lib.optionals stdenv.isDarwin [ xcodebuild ];

buildInputs = lib.optionals stdenv.isDarwin [ ApplicationServices OpenGL ];

propagatedBuildInputs = [ setuptools ];

Expand Down
40 changes: 40 additions & 0 deletions pkgs/development/python-modules/sphinx-book-theme/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, sphinx
, pydata-sphinx-theme
, pyyaml
}:

buildPythonPackage rec {
pname = "sphinx-book-theme";
version = "0.3.2";

format = "wheel";

disabled = pythonOlder "3.7";

src = fetchPypi {
inherit version format;
dist = "py3";
python = "py3";
pname = "sphinx_book_theme";
sha256 = "4aed92f2ed9d27e002eac5dce1daa8eca42dd9e6464811533c569ee156a6f67d";
};

propagatedBuildInputs = [
sphinx
pydata-sphinx-theme
pyyaml
];

pythonImportsCheck = [ "sphinx_book_theme" ];

meta = with lib; {
description = "A clean book theme for scientific explanations and documentation with Sphinx";
homepage = "https://github.com/executablebooks/sphinx-book-theme";
license = licenses.bsd3;
maintainers = with maintainers; [ marsam ];
};
}
26 changes: 26 additions & 0 deletions pkgs/development/python-modules/sphinx-comments/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{ lib
, buildPythonPackage
, fetchPypi
, sphinx
}:

buildPythonPackage rec {
pname = "sphinx-comments";
version = "0.0.3";

src = fetchPypi {
inherit pname version;
sha256 = "00170afff27019fad08e421da1ae49c681831fb2759786f07c826e89ac94cf21";
};

propagatedBuildInputs = [ sphinx ];

pythonImportsCheck = [ "sphinx_comments" ];

meta = with lib; {
description = "Add comments and annotation to your documentation";
homepage = "https://github.com/executablebooks/sphinx-comments";
license = licenses.mit;
maintainers = with maintainers; [ marsam ];
};
}
35 changes: 35 additions & 0 deletions pkgs/development/python-modules/sphinx-design/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, flit-core
, sphinx
}:

buildPythonPackage rec {
pname = "sphinx-design";
version = "0.2.0";

format = "flit";

disabled = pythonOlder "3.7";

src = fetchPypi {
inherit version;
pname = "sphinx_design";
sha256 = "b148a5258061a46ee826d57ea0729260f29b4e9131d2a681545e0d4f3c0f19ee";
};

nativeBuildInputs = [ flit-core ];

propagatedBuildInputs = [ sphinx ];

pythonImportsCheck = [ "sphinx_design" ];

meta = with lib; {
description = "A sphinx extension for designing beautiful, view size responsive web components";
homepage = "https://github.com/executablebooks/sphinx-design";
license = licenses.mit;
maintainers = with maintainers; [ marsam ];
};
}
Loading

0 comments on commit 19d31fc

Please sign in to comment.