From e1a28932913252f279dad662f0b0893968e89965 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 10 May 2024 13:28:04 +0200 Subject: [PATCH 1/4] python312Packages.pyannote-core: refactor - switch to pytestCheckHook - remove vendorized versioneer.py --- .../python-modules/pyannote-core/default.nix | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/pyannote-core/default.nix b/pkgs/development/python-modules/pyannote-core/default.nix index 453bb0c4d60d..a7fcc6f8c995 100644 --- a/pkgs/development/python-modules/pyannote-core/default.nix +++ b/pkgs/development/python-modules/pyannote-core/default.nix @@ -1,12 +1,14 @@ { 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; [ ]; }; From 72113d5e1f43f9d0e15a4882e5c0eed1a295e6d6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 10 May 2024 13:31:47 +0200 Subject: [PATCH 2/4] python312Packages.pyannote-core: format with nixfmt --- .../python-modules/pyannote-core/default.nix | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/pyannote-core/default.nix b/pkgs/development/python-modules/pyannote-core/default.nix index a7fcc6f8c995..85c01bcee578 100644 --- a/pkgs/development/python-modules/pyannote-core/default.nix +++ b/pkgs/development/python-modules/pyannote-core/default.nix @@ -1,14 +1,15 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, numpy -, pandas -, pytestCheckHook -, scipy -, setuptools -, sortedcontainers -, typing-extensions -, versioneer +{ + lib, + buildPythonPackage, + fetchFromGitHub, + numpy, + pandas, + pytestCheckHook, + scipy, + setuptools, + sortedcontainers, + typing-extensions, + versioneer, }: buildPythonPackage rec { From 184839dd8e2778af2d7c79b382273474dbdad215 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 10 May 2024 13:38:09 +0200 Subject: [PATCH 3/4] python312Packages.pyannote-database: format with nixfmt --- .../pyannote-database/default.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/pyannote-database/default.nix b/pkgs/development/python-modules/pyannote-database/default.nix index e3e3ac56ca70..13b6cdc3fc17 100644 --- a/pkgs/development/python-modules/pyannote-database/default.nix +++ b/pkgs/development/python-modules/pyannote-database/default.nix @@ -1,12 +1,13 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, setuptools -, wheel -, pyannote-core -, pyyaml -, pandas -, typer +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + wheel, + pyannote-core, + pyyaml, + pandas, + typer, }: buildPythonPackage rec { From 4eb356a2a9c5f7e303ee2c09b8cd9e6b2d4df052 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 10 May 2024 13:51:26 +0200 Subject: [PATCH 4/4] python312Packages.pyannote-database: refactor --- .../pyannote-database/default.nix | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/pyannote-database/default.nix b/pkgs/development/python-modules/pyannote-database/default.nix index 13b6cdc3fc17..8cb35b26061d 100644 --- a/pkgs/development/python-modules/pyannote-database/default.nix +++ b/pkgs/development/python-modules/pyannote-database/default.nix @@ -2,12 +2,13 @@ lib, buildPythonPackage, fetchFromGitHub, - setuptools, - wheel, - pyannote-core, - pyyaml, pandas, + pyannote-core, + pythonOlder, + pyyaml, + setuptools, typer, + versioneer, }: buildPythonPackage rec { @@ -15,32 +16,39 @@ buildPythonPackage rec { version = "5.0.1"; pyproject = true; + disabled = pythonOlder "3.9"; + src = fetchFromGitHub { owner = "pyannote"; repo = "pyannote-database"; - rev = version; + rev = "refs/tags/${version}"; hash = "sha256-A7Xr24O8OvVAlURrR+SDCh8Uv9Yz3AUJSFDyDShVVjA="; }; - propagatedBuildInputs = [ + postPatch = '' + # Remove vendorized versioneer.py + rm versioneer.py + ''; + + build-system = [ + setuptools + versioneer + ]; + + dependencies = [ pyannote-core pyyaml pandas typer ]; - nativeBuildInputs = [ - setuptools - wheel - ]; - pythonImportsCheck = [ "pyannote.database" ]; meta = with lib; { description = "Reproducible experimental protocols for multimedia (audio, video, text) database"; - mainProgram = "pyannote-database"; homepage = "https://github.com/pyannote/pyannote-database"; license = licenses.mit; maintainers = with maintainers; [ matthewcroughan ]; + mainProgram = "pyannote-database"; }; }