From 26df8e7d72dc4741424d6cd0e2208cafff6f098f Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 28 Jul 2024 19:12:40 -0400 Subject: [PATCH 1/2] python312Packages.bx-python: Drop nose dependency --- pkgs/development/python-modules/bx-python/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/bx-python/default.nix b/pkgs/development/python-modules/bx-python/default.nix index 2ea260df66f8..14b801945006 100644 --- a/pkgs/development/python-modules/bx-python/default.nix +++ b/pkgs/development/python-modules/bx-python/default.nix @@ -7,7 +7,7 @@ cython, zlib, python-lzo, - nose, + pytestCheckHook, }: buildPythonPackage rec { @@ -30,10 +30,13 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy + nativeCheckInputs = [ python-lzo + pytestCheckHook ]; - nativeCheckInputs = [ nose ]; + # https://github.com/bxlab/bx-python/issues/101 + doCheck = false; postInstall = '' cp -r scripts/* $out/bin From a007b9f78b9b9bdf172df5ce3ab7a5d9e1e20566 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 28 Jul 2024 19:12:50 -0400 Subject: [PATCH 2/2] python312Packages.bx-python: Modernize --- .../python-modules/bx-python/default.nix | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/bx-python/default.nix b/pkgs/development/python-modules/bx-python/default.nix index 14b801945006..869440098f1d 100644 --- a/pkgs/development/python-modules/bx-python/default.nix +++ b/pkgs/development/python-modules/bx-python/default.nix @@ -2,34 +2,43 @@ lib, fetchFromGitHub, buildPythonPackage, - pythonOlder, numpy, cython, zlib, python-lzo, pytestCheckHook, + setuptools, + oldest-supported-numpy, }: buildPythonPackage rec { pname = "bx-python"; - version = "0.11.0"; - format = "setuptools"; - - disabled = pythonOlder "3.8"; + version = "0.12.0"; + pyproject = true; src = fetchFromGitHub { owner = "bxlab"; repo = "bx-python"; rev = "refs/tags/v${version}"; - hash = "sha256-evhxh/cCZFSK6EgMu7fC9/ZrPd2S1fZz89ItGYrHQck="; + hash = "sha256-ZpZjh7OXdUY7rd692h7VYHzC3qCrDKFme6r+wuG7GP4="; }; - nativeBuildInputs = [ cython ]; + postPatch = '' + # pytest-cython, which provides this option, isn't packaged + substituteInPlace pytest.ini \ + --replace-fail "--doctest-cython" "" + ''; + + build-system = [ + setuptools + cython + oldest-supported-numpy + ]; buildInputs = [ zlib ]; - propagatedBuildInputs = [ - numpy + dependencies = [ numpy ]; + nativeCheckInputs = [ python-lzo pytestCheckHook @@ -48,12 +57,12 @@ buildPythonPackage rec { ln -s $out/bin scripts ''; - meta = with lib; { + meta = { description = "Tools for manipulating biological data, particularly multiple sequence alignments"; homepage = "https://github.com/bxlab/bx-python"; changelog = "https://github.com/bxlab/bx-python/releases/tag/v${version}"; - license = licenses.mit; - maintainers = with maintainers; [ jbedo ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ jbedo ]; platforms = [ "x86_64-linux" ]; }; }