From 707369808137df4fcc2c5b3f7c4f6a762e816521 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 12 May 2024 14:16:07 +0200 Subject: [PATCH 1/4] python312Packages.lockfile: migrate to pynose and pep517 builder --- .../python-modules/lockfile/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/lockfile/default.nix b/pkgs/development/python-modules/lockfile/default.nix index 0fb64ad0baf9f32..1ee92f4ce38af11 100644 --- a/pkgs/development/python-modules/lockfile/default.nix +++ b/pkgs/development/python-modules/lockfile/default.nix @@ -1,25 +1,32 @@ { lib , buildPythonPackage , fetchPypi +, setuptools , pbr -, nose +, pynose }: buildPythonPackage rec { pname = "lockfile"; version = "0.12.2"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; sha256 = "6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"; }; - buildInputs = [ pbr ]; - nativeCheckInputs = [ nose ]; + build-system = [ + pbr + setuptools + ]; + + nativeCheckInputs = [ pynose ]; checkPhase = '' + runHook preCheck nosetests + runHook postcheck ''; meta = with lib; { From 9175a5cc1fb3c97ab2b915f7ff3fd9508fd250d1 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 12 May 2024 14:42:32 +0200 Subject: [PATCH 2/4] python312Packages.hid: disable tests, use pep517 builder --- .../python-modules/hid/default.nix | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/hid/default.nix b/pkgs/development/python-modules/hid/default.nix index deb4006dfe78a55..7c33cb5b9d3c5b0 100644 --- a/pkgs/development/python-modules/hid/default.nix +++ b/pkgs/development/python-modules/hid/default.nix @@ -1,30 +1,40 @@ { lib , buildPythonPackage , fetchPypi +, setuptools , hidapi -, nose }: buildPythonPackage rec { pname = "hid"; version = "1.0.6"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-SNdk166XRroSO5bb9FeJPKgCaLd5HEsdLgUTEO64OGA="; }; - propagatedBuildInputs = [ hidapi ]; - - nativeCheckInputs = [ nose ]; - postPatch = '' - hidapi=${hidapi}/lib/ - test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } - sed -i -e "s|libhidapi|$hidapi/libhidapi|" hid/__init__.py + hidapi=${hidapi}/lib/ + test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } + sed -i -e "s|libhidapi|$hidapi/libhidapi|" hid/__init__.py ''; + build-system = [ + setuptools + ]; + + dependencies = [ + hidapi + ]; + + doCheck = false; # no tests + + pythonImportsCheck = [ + "hid" + ]; + meta = with lib; { description = "hidapi bindings in ctypes"; homepage = "https://github.com/apmorton/pyhidapi"; From 72bb21b14b0148f277bce4eceb503cb65d5e47a4 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 12 May 2024 14:45:04 +0200 Subject: [PATCH 3/4] python312Packages.opuslib: fix build and tests --- .../python-modules/opuslib/default.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/opuslib/default.nix b/pkgs/development/python-modules/opuslib/default.nix index c30d70851186644..2f5bbf8b2581dec 100644 --- a/pkgs/development/python-modules/opuslib/default.nix +++ b/pkgs/development/python-modules/opuslib/default.nix @@ -1,17 +1,20 @@ -{ buildPythonPackage, +{ + buildPythonPackage, fetchFromGitHub, fetchpatch, isPy27, libopus, - nose, - lib, stdenv, + pynose, + lib, + stdenv, substituteAll, + setuptools, }: buildPythonPackage rec { pname = "opuslib"; version = "3.0.3"; - format = "setuptools"; + pyproject = true; disabled = isPy27; @@ -41,7 +44,11 @@ buildPythonPackage rec { }) ]; - nativeCheckInputs = [ nose ]; + build-system = [ + setuptools + ]; + + nativeCheckInputs = [ pynose ]; meta = with lib; { description = "Python bindings to the libopus, IETF low-delay audio codec"; From 333fdca4ddcf4e42ce86cdf70c255d409450fc79 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 12 May 2024 16:15:58 +0200 Subject: [PATCH 4/4] python312Packages.ansible-runner: fix build --- pkgs/development/python-modules/ansible-runner/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/ansible-runner/default.nix b/pkgs/development/python-modules/ansible-runner/default.nix index ae77ab3594bede7..b0145a3113eea79 100644 --- a/pkgs/development/python-modules/ansible-runner/default.nix +++ b/pkgs/development/python-modules/ansible-runner/default.nix @@ -41,6 +41,11 @@ buildPythonPackage rec { hash = "sha256-eTnQkftvjK0YHU+ovotRVSuVlvaVeXp5SvYk1DPCg88="; excludes = [ ".github/workflows/ci.yml" "tox.ini" ]; }) + (fetchpatch { + # python 3.12 compat + url = "https://github.com/ansible/ansible-runner/commit/dc248497bb2375a363222ce755bf3a31f21d5f64.patch"; + hash = "sha256-QT28Iw0uENoO35rqZpYBcmJB/GNDEF4m86SKf6p0XQU="; + }) ]; build-system = [