diff options
| author | nixpkgs-ci[bot] <190413589+nixpkgs-ci[bot]@users.noreply.github.com> | 2025-01-29 00:17:24 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-29 00:17:24 +0000 |
| commit | ff8afbb98dcd9fcbfb6ef43901ec38ab3daee088 (patch) | |
| tree | 9b202e7461358db7fd560f566b7e5994ee8b3b30 /pkgs/development/python-modules | |
| parent | 462285d7ee74f00a6148c10390cd598e5fccdbbb (diff) | |
| parent | 4a3faa5e86f524d955186f05a762b6bcec01cb94 (diff) | |
Merge 4a3faa5e86f524d955186f05a762b6bcec01cb94 into haskell-updates
Diffstat (limited to 'pkgs/development/python-modules')
14 files changed, 309 insertions, 52 deletions
diff --git a/pkgs/development/python-modules/bindep/default.nix b/pkgs/development/python-modules/bindep/default.nix index 7feb91d8d971..99eca088b2ab 100644 --- a/pkgs/development/python-modules/bindep/default.nix +++ b/pkgs/development/python-modules/bindep/default.nix @@ -11,18 +11,17 @@ buildPythonPackage rec { pname = "bindep"; - version = "2.11.0"; + version = "2.12.0"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-rLLyWbzh/RUIhzR5YJu95bmq5Qg3hHamjWtqGQAufi8="; + hash = "sha256-wGtR5tC6OWWq2PPCXwpXS+D4AboHyxp4SV2olUZ952A="; }; env.PBR_VERSION = version; build-system = [ - distro pbr setuptools ]; @@ -41,7 +40,7 @@ buildPythonPackage rec { meta = with lib; { description = "Bindep is a tool for checking the presence of binary packages needed to use an application / library"; - homepage = "https://docs.opendev.org/opendev/bindep/latest/"; + homepage = "https://opendev.org/opendev/bindep"; license = licenses.asl20; mainProgram = "bindep"; maintainers = teams.openstack.members; diff --git a/pkgs/development/python-modules/compliance-trestle/default.nix b/pkgs/development/python-modules/compliance-trestle/default.nix new file mode 100755 index 000000000000..b67b80f02c01 --- /dev/null +++ b/pkgs/development/python-modules/compliance-trestle/default.nix @@ -0,0 +1,108 @@ +{ + attrs, + buildPythonPackage, + cmarkgfm, + cryptography, + defusedxml, + datamodel-code-generator, + email-validator, + fetchFromGitHub, + furl, + ilcli, + importlib-resources, + jinja2, + lib, + mypy, + openpyxl, + orjson, + paramiko, + pytestCheckHook, + pydantic, + python-dotenv, + python-frontmatter, + requests, + ruamel-yaml, + setuptools, + setuptools-scm, +}: + +buildPythonPackage rec { + pname = "compliance-trestle"; + version = "3.7.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "oscal-compass"; + repo = "compliance-trestle"; + tag = "v${version}"; + hash = "sha256-MEPleUM5gSCJjVaVbNtNzRl+Vvvk97h6Q/mOWIxFd2Q="; + fetchSubmodules = true; + }; + + pythonRelaxDeps = true; + + postPatch = '' + substituteInPlace tests/trestle/misc/mypy_test.py \ + --replace-fail "trestle'," "${placeholder "out"}/bin/trestle'," \ + ''; + + build-system = [ + setuptools + setuptools-scm + ]; + + dependencies = [ + attrs + cmarkgfm + cryptography + defusedxml + datamodel-code-generator + email-validator + furl + ilcli + importlib-resources + jinja2 + openpyxl + orjson + paramiko + pydantic + python-dotenv + python-frontmatter + requests + ruamel-yaml + ]; + + nativeCheckInputs = [ + pytestCheckHook + mypy + ]; + + disabledTests = [ + # Requires network access + "test_import_from_url" + "test_import_from_nist" + "test_remote_profile_relative_cat" + + # AssertionError + "test_profile_generate_assemble_rev_5" + "test_ssp_assemble_fedramp_profile" + "test_ssp_generate_aggregates_no_cds" + "test_ssp_generate_aggregates_no_param_value_orig" + ]; + + disabledTestPaths = [ + # Requires network access + "tests/trestle/core/remote" + ]; + + pythonImportsCheck = [ "trestle" ]; + + meta = { + description = "An opinionated tooling platform for managing compliance as code, using continuous integration and NIST's OSCAL standard"; + homepage = "https://github.com/oscal-compass/compliance-trestle"; + changelog = "https://github.com/oscal-compass/compliance-trestle/blob/${src.rev}/CHANGELOG.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ tochiaha ]; + mainProgram = "trestle"; + }; +} diff --git a/pkgs/development/python-modules/elevenlabs/default.nix b/pkgs/development/python-modules/elevenlabs/default.nix index 14e72f843c0b..9a359369cb12 100644 --- a/pkgs/development/python-modules/elevenlabs/default.nix +++ b/pkgs/development/python-modules/elevenlabs/default.nix @@ -12,7 +12,7 @@ }: let - version = "1.9.0"; + version = "1.50.5"; tag = version; in buildPythonPackage { @@ -24,7 +24,7 @@ buildPythonPackage { owner = "elevenlabs"; repo = "elevenlabs-python"; inherit tag; - hash = "sha256-0fkt2Z05l95b2S+xoyyy9VGAUZDI1SM8kdcP1PCrUg8="; + hash = "sha256-Cew8+L7NoQlvR2pILVmwNIa3WUfZzmEkf1+U2nglsnM="; }; build-system = [ poetry-core ]; diff --git a/pkgs/development/python-modules/imap-tools/default.nix b/pkgs/development/python-modules/imap-tools/default.nix index bc4b2ae8e79a..a7a0736d60db 100644 --- a/pkgs/development/python-modules/imap-tools/default.nix +++ b/pkgs/development/python-modules/imap-tools/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "imap-tools"; - version = "1.9.0"; + version = "1.9.1"; pyproject = true; src = fetchFromGitHub { owner = "ikvk"; repo = "imap_tools"; tag = "v${version}"; - hash = "sha256-2frJqHKIOuERC8G6fJwJOdxcWHRQRRy1BxfZDrVhXEU="; + hash = "sha256-tlShiI90PAbWztrL5PgmE1D+/h6bUoSxAHxwGlQHvus="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/jaxtyping/default.nix b/pkgs/development/python-modules/jaxtyping/default.nix index 01d06d31eb12..f29fa882b578 100644 --- a/pkgs/development/python-modules/jaxtyping/default.nix +++ b/pkgs/development/python-modules/jaxtyping/default.nix @@ -6,6 +6,9 @@ # build-system hatchling, + # dependencies + wadler-lindig, + # tests cloudpickle, equinox, @@ -20,18 +23,22 @@ let self = buildPythonPackage rec { pname = "jaxtyping"; - version = "0.2.36"; + version = "0.2.37"; pyproject = true; src = fetchFromGitHub { owner = "google"; repo = "jaxtyping"; tag = "v${version}"; - hash = "sha256-TXhHh6Nka9TOnfFPaNyHmLdTkhzyFEY0mLSfoDf9KQc="; + hash = "sha256-0a/9TSQW/k5kuucHoSUhLtRk9k+5ycbI/g6V1id3v28="; }; build-system = [ hatchling ]; + dependencies = [ + wadler-lindig + ]; + pythonImportsCheck = [ "jaxtyping" ]; nativeCheckInputs = [ diff --git a/pkgs/development/python-modules/jupyter-server/default.nix b/pkgs/development/python-modules/jupyter-server/default.nix index 071b3707225b..8eeffccb26a5 100644 --- a/pkgs/development/python-modules/jupyter-server/default.nix +++ b/pkgs/development/python-modules/jupyter-server/default.nix @@ -3,7 +3,6 @@ stdenv, buildPythonPackage, fetchPypi, - pythonOlder, hatch-jupyter-builder, hatchling, pytestCheckHook, @@ -37,7 +36,6 @@ buildPythonPackage rec { pname = "jupyter-server"; version = "2.14.2"; pyproject = true; - disabled = pythonOlder "3.8"; src = fetchPypi { pname = "jupyter_server"; @@ -45,12 +43,12 @@ buildPythonPackage rec { hash = "sha256-ZglQIaqWOM7SdsJIsdgYYuTFDyktV1kgu+lg3hxWsSs="; }; - nativeBuildInputs = [ + build-system = [ hatch-jupyter-builder hatchling ]; - propagatedBuildInputs = [ + dependencies = [ argon2-cffi jinja2 tornado @@ -87,6 +85,11 @@ buildPythonPackage rec { pytestFlagsArray = [ "-W" "ignore::DeprecationWarning" + # 19 failures on python 3.13: + # ResourceWarning: unclosed database in <sqlite3.Connection object at 0x7ffff2a0cc70> + # TODO: Can probably be removed at the next update + "-W" + "ignore::pytest.PytestUnraisableExceptionWarning" ]; preCheck = '' @@ -111,6 +114,10 @@ buildPythonPackage rec { ++ lib.optionals stdenv.hostPlatform.isLinux [ # Failed: DID NOT RAISE <class 'tornado.web.HTTPError'> "test_copy_big_dir" + ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ + # TypeError: the JSON object must be str, bytes or bytearray, not NoneType + "test_terminal_create_with_cwd" ]; disabledTestPaths = [ @@ -123,12 +130,12 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; - meta = with lib; { + meta = { changelog = "https://github.com/jupyter-server/jupyter_server/blob/v${version}/CHANGELOG.md"; description = "Backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications"; mainProgram = "jupyter-server"; homepage = "https://github.com/jupyter-server/jupyter_server"; - license = licenses.bsdOriginal; + license = lib.licenses.bsdOriginal; maintainers = lib.teams.jupyter.members; }; } diff --git a/pkgs/development/python-modules/llama-cpp-python/default.nix b/pkgs/development/python-modules/llama-cpp-python/default.nix index ec69378235e6..6c07005d4ddf 100644 --- a/pkgs/development/python-modules/llama-cpp-python/default.nix +++ b/pkgs/development/python-modules/llama-cpp-python/default.nix @@ -1,8 +1,10 @@ { lib, stdenv, + gcc13Stdenv, buildPythonPackage, fetchFromGitHub, + fetchpatch2, # nativeBuildInputs cmake, @@ -33,6 +35,9 @@ cudaPackages ? { }, }: +let + stdenvTarget = if cudaSupport then gcc13Stdenv else stdenv; +in buildPythonPackage rec { pname = "llama-cpp-python"; version = "0.3.6"; @@ -47,6 +52,16 @@ buildPythonPackage rec { }; # src = /home/gaetan/llama-cpp-python; + patches = [ + # fix segfault when running tests due to missing default Metal devices + (fetchpatch2 { + url = "https://github.com/ggerganov/llama.cpp/commit/acd38efee316f3a5ed2e6afcbc5814807c347053.patch?full_index=1"; + stripLen = 1; + extraPrefix = "vendor/llama.cpp/"; + hash = "sha256-71+Lpg9z5KPlaQTX9D85KS2LXFWLQNJJ18TJyyq3/pU="; + }) + ]; + dontUseCmakeConfigure = true; SKBUILD_CMAKE_ARGS = lib.strings.concatStringsSep ";" ( lib.optionals cudaSupport [ @@ -76,6 +91,8 @@ buildPythonPackage rec { ] ); + stdenv = stdenvTarget; + dependencies = [ diskcache jinja2 @@ -99,7 +116,11 @@ buildPythonPackage rec { passthru = { updateScript = gitUpdater { rev-prefix = "v"; }; - tests.llama-cpp-python = llama-cpp-python.override { cudaSupport = true; }; + tests = lib.optionalAttrs stdenvTarget.hostPlatform.isLinux { + withCuda = llama-cpp-python.override { + cudaSupport = true; + }; + }; }; meta = { @@ -109,12 +130,6 @@ buildPythonPackage rec { license = lib.licenses.mit; maintainers = with lib.maintainers; [ kirillrdy ]; badPlatforms = [ - # Segfaults during tests: - # tests/test_llama.py .Fatal Python error: Segmentation fault - # Current thread 0x00000001f3decf40 (most recent call first): - # File "/private/tmp/nix-build-python3.12-llama-cpp-python-0.3.2.drv-0/source/llama_cpp/_internals.py", line 51 in __init__ - lib.systems.inspect.patterns.isDarwin - # cc1: error: unknown value ‘native+nodotprod+noi8mm+nosve’ for ‘-mcpu’ "aarch64-linux" ]; diff --git a/pkgs/development/python-modules/mallard-ducktype/default.nix b/pkgs/development/python-modules/mallard-ducktype/default.nix new file mode 100644 index 000000000000..f13d66593ed5 --- /dev/null +++ b/pkgs/development/python-modules/mallard-ducktype/default.nix @@ -0,0 +1,38 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, +}: + +buildPythonPackage rec { + pname = "mallard-ducktype"; + version = "1.0.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "projectmallard"; + repo = "mallard-ducktype"; + tag = version; + hash = "sha256-jHjzTBBRBh//bOrdnyCRmZRmpupgDaDRuZGAd75baco="; + }; + + build-system = [ setuptools ]; + + checkPhase = '' + runHook preCheck + pushd tests + ./runtests + popd + runHook postCheck + ''; + + pythonImportsCheck = [ "mallard" ]; + + meta = { + description = "Parser for the lightweight Ducktype syntax for Mallard"; + homepage = "https://github.com/projectmallard/mallard-ducktype"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/development/python-modules/pyiskra/default.nix b/pkgs/development/python-modules/pyiskra/default.nix index 0c12f0612792..c52242f8ed5b 100644 --- a/pkgs/development/python-modules/pyiskra/default.nix +++ b/pkgs/development/python-modules/pyiskra/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "pyiskra"; - version = "0.1.14"; + version = "0.1.15"; pyproject = true; src = fetchFromGitHub { owner = "Iskramis"; repo = "pyiskra"; tag = "v${version}"; - hash = "sha256-OLNUa11UULiW6E8nVy5rUyN7iAD7KdM+R76m2zaDOgc="; + hash = "sha256-LIrhd2gDqa1AehnG0WVQKUNbFTuFkLcHwqNAjFejYk0="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/scrap-engine/default.nix b/pkgs/development/python-modules/scrap-engine/default.nix index 0a8c9fed90e8..2583c637f7a8 100644 --- a/pkgs/development/python-modules/scrap-engine/default.nix +++ b/pkgs/development/python-modules/scrap-engine/default.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "scrap-engine"; - version = "1.4.1"; + version = "1.4.2"; pyproject = true; src = fetchPypi { pname = "scrap_engine"; inherit version; - hash = "sha256-qxzbVYFcSKcL2HtMlH9epO/sCx9HckWAt/NyVD8QJBQ="; + hash = "sha256-9jiStwFD5vhPSxWsEVmHOvfRgNgVOUvlzAa1Rmf+faE="; }; build-system = [ diff --git a/pkgs/development/python-modules/stable-baselines3/default.nix b/pkgs/development/python-modules/stable-baselines3/default.nix index a9d784707886..0cca87dd9857 100644 --- a/pkgs/development/python-modules/stable-baselines3/default.nix +++ b/pkgs/development/python-modules/stable-baselines3/default.nix @@ -22,16 +22,14 @@ }: buildPythonPackage rec { pname = "stable-baselines3"; - # TODO: To this date, the latest release (2.4.1) is not compatible with numpy 2 and does not build - # successfully on nixpkgs - version = "2.4.1-unstable-2025-01-07"; + version = "2.5.0"; pyproject = true; src = fetchFromGitHub { owner = "DLR-RM"; repo = "stable-baselines3"; - rev = "b7c64a1aa4dd2fd3efed96e7a9ddb4d1f5c96112"; - hash = "sha256-oyTOBRZsKkhhGKwwBN9HCV0t8+MkJYpWsTRdS+upMeI="; + tag = "v${version}"; + hash = "sha256-4KOF/3/PxHHSo95zaqtPy5+h53VcUsMhSx85tGvXV2o="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/wadler-lindig/default.nix b/pkgs/development/python-modules/wadler-lindig/default.nix new file mode 100644 index 000000000000..7011c0a9ef16 --- /dev/null +++ b/pkgs/development/python-modules/wadler-lindig/default.nix @@ -0,0 +1,46 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + hatchling, + + # tests + numpy, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "wadler-lindig"; + version = "0.1.3"; + pyproject = true; + + src = fetchFromGitHub { + owner = "patrick-kidger"; + repo = "wadler_lindig"; + rev = "v${version}"; + hash = "sha256-akb1x9UYbfEwnVS6ahpb42XnEl3y7kk3WkhwD8p7AA4="; + }; + + build-system = [ + hatchling + ]; + + pythonImportsCheck = [ + "wadler_lindig" + ]; + + nativeCheckInputs = [ + numpy + pytestCheckHook + ]; + + meta = { + description = "A Wadler--Lindig pretty printer for Python"; + homepage = "https://github.com/patrick-kidger/wadler_lindig"; + changelog = "https://github.com/patrick-kidger/wadler_lindig/releases/tag/v${version}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ GaetanLepage ]; + }; +} diff --git a/pkgs/development/python-modules/whey-pth/default.nix b/pkgs/development/python-modules/whey-pth/default.nix index c40292ede641..a389860d1e2d 100644 --- a/pkgs/development/python-modules/whey-pth/default.nix +++ b/pkgs/development/python-modules/whey-pth/default.nix @@ -1,21 +1,30 @@ { buildPythonPackage, - fetchPypi, + fetchFromGitHub, lib, setuptools, dom-toml, whey, + pytestCheckHook, }: + buildPythonPackage rec { pname = "whey-pth"; version = "0.0.6"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-CIpgqzNXW3VpS+k6BCpc2DNyqwgt/Af3ms59AH/V5KM="; + src = fetchFromGitHub { + owner = "repo-helper"; + repo = "whey-pth"; + tag = "v${version}"; + hash = "sha256-A+bXB9F8FD+A1iRuETIxP12bkH/5NKcx01ERXJZAj+Q="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail 'setuptools!=61.*,<=67.1.0,>=40.6.0' setuptools + ''; + build-system = [ setuptools ]; dependencies = [ @@ -23,14 +32,18 @@ buildPythonPackage rec { whey ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail '"setuptools!=61.*,<=67.1.0,>=40.6.0"' '"setuptools"' - ''; + pythonImportsCheck = [ "whey_pth" ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + # missing dependency coincidence + doCheck = false; meta = { - description = "Extension to whey to support .pth files."; - homepage = "https://pypi.org/project/whey-pth"; + description = "Extension to whey to support .pth files"; + homepage = "https://github.com/repo-helper/whey-pth"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ tyberius-prime ]; }; diff --git a/pkgs/development/python-modules/whey/default.nix b/pkgs/development/python-modules/whey/default.nix index 7c1aaec13e6c..61ef34e74ad6 100644 --- a/pkgs/development/python-modules/whey/default.nix +++ b/pkgs/development/python-modules/whey/default.nix @@ -1,30 +1,41 @@ { buildPythonPackage, - fetchPypi, + fetchFromGitHub, lib, setuptools, attrs, click, consolekit, dist-meta, + docutils, dom-toml, domdf-python-tools, + editables, handy-archives, natsort, packaging, pyproject-parser, + pytestCheckHook, shippinglabel, }: + buildPythonPackage rec { pname = "whey"; version = "0.1.1"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-l72fjczuuDXg/cDiqJ7roNVm4X+au+1u4AA8Szs1bNo="; + src = fetchFromGitHub { + owner = "repo-helper"; + repo = "whey"; + tag = "v${version}"; + hash = "sha256-s2jZmuFj0gTWVTcXWcBhcu5RBuaf/qMS/xzIpIoG1ZE="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail 'setuptools!=61.*,<=67.1.0,>=40.6.0' setuptools + ''; + build-system = [ setuptools ]; dependencies = [ @@ -41,14 +52,29 @@ buildPythonPackage rec { shippinglabel ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail '"setuptools!=61.*,<=67.1.0,>=40.6.0"' '"setuptools"' - ''; + pythonImportsCheck = [ "whey" ]; + + optional-dependencies = { + all = lib.flatten (lib.attrValues (lib.filterAttrs (n: v: n != "all") optional-dependencies)); + editable = [ + editables + ]; + readme = [ + docutils + pyproject-parser + ] ++ pyproject-parser.optional-dependencies.readme; + }; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + # missing dependency pyproject-examples + doCheck = false; meta = { - description = "A simple Python wheel builder for simple projects."; - homepage = "https://pypi.org/project/whey"; + description = "Simple Python wheel builder for simple projects"; + homepage = "https://github.com/repo-helper/whey"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ tyberius-prime ]; }; |
