Commit e1a28932 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python312Packages.pyannote-core: refactor

- switch to pytestCheckHook
- remove vendorized versioneer.py
parent adc41e1e
Loading
Loading
Loading
Loading
+21 −8
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, wheel
, sortedcontainers
, numpy
, pandas
, pytestCheckHook
, scipy
, setuptools
, sortedcontainers
, typing-extensions
, versioneer
}:

buildPythonPackage rec {
@@ -17,20 +19,30 @@ buildPythonPackage rec {
  src = fetchFromGitHub {
    owner = "pyannote";
    repo = "pyannote-core";
    rev = version;
    rev = "refs/tags/${version}";
    hash = "sha256-XQVEMy60LkfFr2TKXTeg6cGHRx5BUZ5qDgzIdKy/19Y=";
  };

  propagatedBuildInputs = [
  postPatch = ''
    # Remove vendorized versioneer.py
    rm versioneer.py
  '';

  build-system = [
    setuptools
    versioneer
  ];

  dependencies = [
    sortedcontainers
    numpy
    scipy
    typing-extensions
  ];

  nativeBuildInputs = [
    setuptools
    wheel
  nativeCheckInputs = [
    pandas
    pytestCheckHook
  ];

  pythonImportsCheck = [ "pyannote.core" ];
@@ -38,6 +50,7 @@ buildPythonPackage rec {
  meta = with lib; {
    description = "Advanced data structures for handling temporal segments with attached labels";
    homepage = "https://github.com/pyannote/pyannote-core";
    changelog = "https://github.com/pyannote/pyannote-core/releases/tag/${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };