From 238c85347143cce6080bd02ea7d0b28436a4a75f Mon Sep 17 00:00:00 2001 From: "John D. Boy" <2187261+jboynyc@users.noreply.github.com> Date: Fri, 28 Mar 2025 13:11:17 +0100 Subject: [PATCH] python3Packages.textnets: 0.9.5 -> 0.10.3 --- .../python-modules/textnets/default.nix | 36 ++++++------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/pkgs/development/python-modules/textnets/default.nix b/pkgs/development/python-modules/textnets/default.nix index 2db378b5a0f5..3456f1b11050 100644 --- a/pkgs/development/python-modules/textnets/default.nix +++ b/pkgs/development/python-modules/textnets/default.nix @@ -5,14 +5,14 @@ fetchFromGitHub, # build-system - cython, - poetry-core, + cython_0, + pdm-backend, setuptools, # dependencies - cairocffi, igraph, leidenalg, + matplotlib, pandas, pyarrow, scipy, @@ -29,33 +29,31 @@ buildPythonPackage rec { pname = "textnets"; - version = "0.9.5"; + version = "0.10.3"; pyproject = true; src = fetchFromGitHub { owner = "jboynyc"; repo = "textnets"; tag = "v${version}"; - hash = "sha256-MdKPxIshSx6U2EFGDTUS4EhoByyuVf0HKqvm9cS2KNY="; + hash = "sha256-BK0bBoe6GrZpVL4HvTwzRlXRWXfKdYJDhLD2UQctTjc="; }; build-system = [ - cython - poetry-core + cython_0 + pdm-backend setuptools ]; pythonRelaxDeps = [ - "igraph" - "leidenalg" "pyarrow" "toolz" ]; dependencies = [ - cairocffi igraph leidenalg + matplotlib pandas pyarrow scipy @@ -73,25 +71,13 @@ buildPythonPackage rec { pythonImportsCheck = [ "textnets" ]; - # Enables the package to find the cythonized .so files during testing. See #255262 + # Enable the package to find the cythonized .so files during testing. See #255262 + # Set MPLBACKEND=agg for headless matplotlib on darwin. See #350784 preCheck = '' rm -r textnets + export MPLBACKEND=agg ''; - disabledTests = - [ - # Test fails: Throws a UserWarning asking the user to install `textnets[fca]`. - "test_context" - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - # MemoryError: ("cairo returned CAIRO_STATUS_NO_MEMORY: b'out of memory'", 1) - "test_plot_backbone" - "test_plot_filtered" - "test_plot_layout" - "test_plot_projected" - "test_plot_scaled" - ]; - meta = { description = "Text analysis with networks"; homepage = "https://textnets.readthedocs.io";