diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-11-10 06:01:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-10 06:01:13 +0000 |
commit | 72fad8615707f02e87cf0f3a5e80fa5072b4196b (patch) | |
tree | 22b081b489f2e0f58097027042fef95125dafb13 /pkgs/development | |
parent | 020ea91183e3266d35554adcea3d9cfa0070061c (diff) | |
parent | d01cb18be494e3d860fcfe6be4ad63614360333c (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/development')
7 files changed, 108 insertions, 96 deletions
diff --git a/pkgs/development/python-modules/jupyter_core/default.nix b/pkgs/development/python-modules/jupyter_core/default.nix index b7838ff5915f6..56dc157a69d2c 100644 --- a/pkgs/development/python-modules/jupyter_core/default.nix +++ b/pkgs/development/python-modules/jupyter_core/default.nix @@ -1,42 +1,44 @@ { lib , buildPythonPackage -, fetchPypi -, isPy3k -, fetchpatch -, python -, ipython +, pythonOlder +, fetchFromGitHub +, hatchling , traitlets -, glibcLocales -, mock , pytestCheckHook -, nose }: buildPythonPackage rec { pname = "jupyter_core"; - version = "4.9.2"; - disabled = !isPy3k; + version = "4.11.2"; + disabled = pythonOlder "3.7"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-1puuuf+xKLjNJlf88nA/icdp0Wc8hRgSEZ46Kg6TrZo="; - }; + format = "pyproject"; - checkInputs = [ pytestCheckHook mock glibcLocales nose ]; - propagatedBuildInputs = [ ipython traitlets ]; + src = fetchFromGitHub { + owner = "jupyter"; + repo = "jupyter_core"; + rev = version; + hash = "sha256-lDhwvhsOxLHBC6CQjCW/rmtHSuMRPC2yaurBd5K3FLc="; + }; patches = [ - # install jupyter_core/*.py files - (fetchpatch { - url = "https://github.com/jupyter/jupyter_core/pull/253/commits/3bbeaebec0a53520523162d5e8d5c6ca02b1b782.patch"; - sha256 = "sha256-QeAfj7wLz4egVUPMAgrZ9Wn/Tv60LrIXLgHGVoH41wQ="; - }) ./tests_respect_pythonpath.patch ]; + nativeBuildInputs = [ + hatchling + ]; + + propagatedBuildInputs = [ + traitlets + ]; + + checkInputs = [ + pytestCheckHook + ]; + preCheck = '' export HOME=$TMPDIR - export LC_ALL=en_US.utf8 ''; disabledTests = [ @@ -51,7 +53,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "jupyter_core" ]; meta = with lib; { - description = "Jupyter core package. A base package on which Jupyter projects rely"; + description = "Base package on which Jupyter projects rely"; homepage = "https://jupyter.org/"; license = licenses.bsd3; maintainers = with maintainers; [ fridh ]; diff --git a/pkgs/development/python-modules/jupyter_core/tests_respect_pythonpath.patch b/pkgs/development/python-modules/jupyter_core/tests_respect_pythonpath.patch index 7e7e9ae93a090..eb061676c0e2f 100644 --- a/pkgs/development/python-modules/jupyter_core/tests_respect_pythonpath.patch +++ b/pkgs/development/python-modules/jupyter_core/tests_respect_pythonpath.patch @@ -1,20 +1,22 @@ +diff --git a/jupyter_core/tests/test_command.py b/jupyter_core/tests/test_command.py +index 4ef38cd..08fba22 100644 --- a/jupyter_core/tests/test_command.py +++ b/jupyter_core/tests/test_command.py -@@ -131,7 +131,7 @@ def test_not_on_path(tmpdir): - witness_src = '#!%s\n%s\n' % (sys.executable, 'print("WITNESS ME")') +@@ -174,7 +174,7 @@ def test_not_on_path(tmpdir): + witness_src = "#!{}\n{}\n".format(sys.executable, 'print("WITNESS ME")') write_executable(witness, witness_src) - -- env = {'PATH': ''} -+ env = {'PATH': '', 'PYTHONPATH': os.environ['PYTHONPATH']} - if 'SYSTEMROOT' in os.environ: # Windows http://bugs.python.org/issue20614 - env[str('SYSTEMROOT')] = os.environ['SYSTEMROOT'] - if sys.platform == 'win32': -@@ -157,7 +157,7 @@ def test_path_priority(tmpdir): - witness_b_src = '#!%s\n%s\n' % (sys.executable, 'print("WITNESS B")') + +- env = {"PATH": ""} ++ env = {"PATH": "", "PYTHONPATH": os.environ["PYTHONPATH"]} + if "SYSTEMROOT" in os.environ: # Windows http://bugs.python.org/issue20614 + env["SYSTEMROOT"] = os.environ["SYSTEMROOT"] + if sys.platform == "win32": +@@ -198,7 +198,7 @@ def test_path_priority(tmpdir): + witness_b_src = "#!{}\n{}\n".format(sys.executable, 'print("WITNESS B")') write_executable(witness_b, witness_b_src) - -- env = {'PATH': str(b)} -+ env = {'PATH': str(b), 'PYTHONPATH': os.environ['PYTHONPATH']} - if 'SYSTEMROOT' in os.environ: # Windows http://bugs.python.org/issue20614 - env[str('SYSTEMROOT')] = os.environ['SYSTEMROOT'] - if sys.platform == 'win32': + +- env = {"PATH": str(b)} ++ env = {"PATH": str(b), "PYTHONPATH": os.environ["PYTHONPATH"]} + if "SYSTEMROOT" in os.environ: # Windows http://bugs.python.org/issue20614 + env["SYSTEMROOT"] = os.environ["SYSTEMROOT"] + if sys.platform == "win32": diff --git a/pkgs/development/python-modules/jupytext/default.nix b/pkgs/development/python-modules/jupytext/default.nix index 37f855394cdda..dabbe303e161c 100644 --- a/pkgs/development/python-modules/jupytext/default.nix +++ b/pkgs/development/python-modules/jupytext/default.nix @@ -2,6 +2,7 @@ , stdenv , buildPythonPackage , fetchFromGitHub +, fetchpatch , GitPython , isort , jupyter-client @@ -31,6 +32,13 @@ buildPythonPackage rec { sha256 = "sha256-DDF4aTLkhEl4xViYh/E0/y6swcwZ9KbeS0qKm+HdFz8="; }; + patches = [ + (fetchpatch { + url = "https://github.com/mwouts/jupytext/commit/be9b65b03600227b737b5f10ea259a7cdb762b76.patch"; + hash = "sha256-3klx8I+T560EVfsKe/FlrSjF6JzdKSCt6uhAW2cSwtc="; + }) + ]; + buildInputs = [ jupyter-packaging jupyterlab diff --git a/pkgs/development/python-modules/mkdocs-jupyter/default.nix b/pkgs/development/python-modules/mkdocs-jupyter/default.nix index 2c9b85e64e0bc..846d40a25fa01 100644 --- a/pkgs/development/python-modules/mkdocs-jupyter/default.nix +++ b/pkgs/development/python-modules/mkdocs-jupyter/default.nix @@ -21,6 +21,8 @@ buildPythonPackage rec { }; postPatch = '' + substituteInPlace setup.py \ + --replace "nbconvert>=6.2.0,<7.0.0" "nbconvert>=6.2.0" substituteInPlace mkdocs_jupyter/tests/test_base_usage.py \ --replace "[\"mkdocs\"," "[\"${mkdocs.out}/bin/mkdocs\"," ''; diff --git a/pkgs/development/python-modules/nbconvert/default.nix b/pkgs/development/python-modules/nbconvert/default.nix index 1940da96047da..51123d05ef4a4 100644 --- a/pkgs/development/python-modules/nbconvert/default.nix +++ b/pkgs/development/python-modules/nbconvert/default.nix @@ -4,78 +4,80 @@ , defusedxml , fetchPypi , fetchpatch +, fetchurl +, hatchling +, importlib-metadata , ipywidgets , jinja2 +, jupyter_core , jupyterlab-pygments , lib , markupsafe , mistune , nbclient +, packaging , pandocfilters +, pygments , pyppeteer , pytestCheckHook +, pythonOlder , tinycss2 +, traitlets }: -buildPythonPackage rec { +let + # see https://github.com/jupyter/nbconvert/issues/1896 + style-css = fetchurl { + url = "https://cdn.jupyter.org/notebook/5.4.0/style/style.min.css"; + hash = "sha256-WGWmCfRDewRkvBIc1We2GQdOVAoFFaO4LyIvdk61HgE="; + }; +in buildPythonPackage rec { pname = "nbconvert"; - version = "6.5.3"; - format = "setuptools"; + version = "7.2.3"; + + disabled = pythonOlder "3.7"; + + format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-EO1pPEz9PGNYPIfKXDovbth0FFEDWV84JO/Mjfy3Uiw="; + hash = "sha256-eufMxoSVtWXasVNFnufmUDmXCRPrEVBw2m4sZzzw6fg="; }; # Add $out/share/jupyter to the list of paths that are used to search for # various exporter templates patches = [ ./templates.patch - - # Use mistune 2.x - (fetchpatch { - name = "support-mistune-2.x.patch"; - url = "https://github.com/jupyter/nbconvert/commit/e870d9a4a61432a65bee5466c5fa80c9ee28966e.patch"; - hash = "sha256-kdOmE7BnkRy2lsNQ2OVrEXXZntJUPJ//b139kSsfKmI="; - excludes = [ "pyproject.toml" ]; - }) - - # patch nbconvert/filters/markdown_mistune.py - (fetchpatch { - name = "clean-up-markdown-parsing.patch"; - url = "https://github.com/jupyter/nbconvert/commit/4df1f5451c9c3e8121036dfbc7e07f0095f4d524.patch"; - hash = "sha256-O+VWUaQi8UMCpE9/h/IsrenmEuJ2ac/kBkUBq7GFJTY"; - }) - (fetchpatch { - name = "fix-markdown-table.patch"; - url = "https://github.com/jupyter/nbconvert/commit/d3900ed4527f024138dc3a8658c6a1b1dfc43c09.patch"; - hash = "sha256-AFE1Zhw29JMLB0Sj17zHcOfy7VEFqLekO8NYbyMLrdI="; - }) ]; postPatch = '' substituteAllInPlace ./nbconvert/exporters/templateexporter.py - # Use mistune 2.x - substituteInPlace setup.py \ - --replace "mistune>=0.8.1,<2" "mistune>=2.0.3,<3" - - # Equivalent of the upstream patch https://github.com/jupyter/nbconvert/commit/aec39288c9a6c614d659bcaf9f5cb36634d6b37b.patch - substituteInPlace share/jupyter/nbconvert/templates/lab/base.html.j2 \ - --replace "{{ output.data['image/svg+xml'] | clean_html }}" "{{ output.data['image/svg+xml'].encode(\"utf-8\") | clean_html }}" + mkdir -p share/templates/classic/static + cp ${style-css} share/templates/classic/static/style.css ''; + nativeBuildInputs = [ + hatchling + ]; + propagatedBuildInputs = [ beautifulsoup4 bleach defusedxml jinja2 + jupyter_core jupyterlab-pygments markupsafe mistune nbclient + packaging pandocfilters + pygments tinycss2 + traitlets + ] ++ lib.optionals (pythonOlder "3.10") [ + importlib-metadata ]; preCheck = '' @@ -88,15 +90,13 @@ buildPythonPackage rec { pytestCheckHook ]; - pytestFlagsArray = [ - # DeprecationWarning: Support for bleach <5 will be removed in a future version of nbconvert - "-W ignore::DeprecationWarning" - ]; - disabledTests = [ # Attempts network access (Failed to establish a new connection: [Errno -3] Temporary failure in name resolution) "test_export" "test_webpdf_with_chromium" + # ModuleNotFoundError: No module named 'nbconvert.tests' + "test_convert_full_qualified_name" + "test_post_processor" ]; # Some of the tests use localhost networking. diff --git a/pkgs/development/python-modules/nbformat/default.nix b/pkgs/development/python-modules/nbformat/default.nix index fabee5f10a2b5..a418e5c6b48fa 100644 --- a/pkgs/development/python-modules/nbformat/default.nix +++ b/pkgs/development/python-modules/nbformat/default.nix @@ -1,50 +1,48 @@ { lib , buildPythonPackage +, pythonOlder , fetchPypi +, hatchling +, hatch-nodejs-version , fastjsonschema -, flit-core -, pytestCheckHook -, glibcLocales -, ipython_genutils -, traitlets -, testpath , jsonschema , jupyter_core +, traitlets , pep440 +, pytestCheckHook +, testpath }: buildPythonPackage rec { pname = "nbformat"; - version = "5.5.0"; + version = "5.7.0"; + + disabled = pythonOlder "3.7"; + format = "pyproject"; src = fetchPypi { inherit pname version; - sha256 = "sha256-nr4w5sOz5bR9Of8KOJehrPUj0r+vy04tBM23D4pmxQc="; + sha256 = "1d4760c15c1a04269ef5caf375be8b98dd2f696e5eb9e603ec2bf091f9b0d3f3"; }; nativeBuildInputs = [ - flit-core + hatchling + hatch-nodejs-version ]; - LC_ALL="en_US.utf8"; - propagatedBuildInputs = [ fastjsonschema - ipython_genutils jsonschema jupyter_core - pep440 - testpath traitlets ]; - checkInputs = [ pytestCheckHook glibcLocales ]; - - preCheck = '' - mkdir tmp - export HOME=tmp - ''; + checkInputs = [ + pep440 + pytestCheckHook + testpath + ]; # Some of the tests use localhost networking. __darwinAllowLocalNetworking = true; diff --git a/pkgs/development/tools/azure-functions-core-tools/default.nix b/pkgs/development/tools/azure-functions-core-tools/default.nix index 251493d0deb37..d4cebd5551e91 100644 --- a/pkgs/development/tools/azure-functions-core-tools/default.nix +++ b/pkgs/development/tools/azure-functions-core-tools/default.nix @@ -80,7 +80,7 @@ stdenv.mkDerivation rec { binaryNativeCode ]; license = licenses.mit; - maintainers = with maintainers; [ jshcmpbll ]; + maintainers = with maintainers; [ ]; platforms = platforms.unix; }; } |