Unverified Commit a007b9f7 authored by Pyrox's avatar Pyrox
Browse files

python312Packages.bx-python: Modernize

parent 26df8e7d
Loading
Loading
Loading
Loading
+21 −12
Original line number Diff line number Diff line
@@ -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" ];
  };
}