From 0875b948333a0ef76e4e606258606489d7e6e30d Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sun, 12 May 2024 16:40:55 +0200 Subject: [PATCH 1/4] python312Packages.pytest-fixture-config: 1.7.0 -> 1.7.1-unstable-2022-10-03 --- .../pytest-fixture-config/default.nix | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/pytest-fixture-config/default.nix b/pkgs/development/python-modules/pytest-fixture-config/default.nix index 31ab985dbff2d6..5be97cd7471ce9 100644 --- a/pkgs/development/python-modules/pytest-fixture-config/default.nix +++ b/pkgs/development/python-modules/pytest-fixture-config/default.nix @@ -1,17 +1,30 @@ -{ lib, buildPythonPackage, fetchPypi -, setuptools-git, pytest }: +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + setuptools-git, + pytest, +}: buildPythonPackage rec { pname = "pytest-fixture-config"; - version = "1.7.0"; - format = "setuptools"; + version = "1.7.1-unstable-2022-10-03"; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "13i1qpz22w3x4dmw8vih5jdnbqfqvl7jiqs0dg764s0zf8bp98a1"; + src = fetchFromGitHub { + owner = "man-group"; + repo = "pytest-plugins"; + rev = "5f9b88a65a8c1e506885352bbd9b2a47900f5014"; + hash = "sha256-huN3RzwtfVf4iMJ96VRP/ldOxTUlUMF1wJIdbcGXHn4="; }; - nativeBuildInputs = [ setuptools-git ]; + sourceRoot = "${src.name}/pytest-fixture-config"; + + nativeBuildInputs = [ + setuptools + setuptools-git + ]; buildInputs = [ pytest ]; From bc1b31792d5a84fa508fccdf6a5b7811fe1f47ab Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sat, 11 May 2024 21:28:27 +0200 Subject: [PATCH 2/4] python312Packages.pytest-shutil: 1.7.0 -> 1.7.1-unstable-2022-10-03 --- .../python-modules/pytest-shutil/default.nix | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/pkgs/development/python-modules/pytest-shutil/default.nix b/pkgs/development/python-modules/pytest-shutil/default.nix index 480c15b87c361b..d9c80a93510ee1 100644 --- a/pkgs/development/python-modules/pytest-shutil/default.nix +++ b/pkgs/development/python-modules/pytest-shutil/default.nix @@ -1,13 +1,15 @@ { lib , isPyPy , buildPythonPackage -, fetchPypi +, pytest-fixture-config +, fetchpatch -# build -, pytest +# build-time +, setuptools +, setuptools-git # runtime -, setuptools-git +, pytest , mock , path , execnet @@ -15,32 +17,34 @@ , six # tests -, cmdline , pytestCheckHook }: buildPythonPackage rec { pname = "pytest-shutil"; - version = "1.7.0"; - format = "setuptools"; + inherit (pytest-fixture-config) version src; + pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-2BZSYd5251CFBcNB2UwCsRPclj8nRUOrynTb+r0CEmE="; - }; + sourceRoot = "${src.name}/pytest-shutil"; - postPatch = '' - substituteInPlace setup.py \ - --replace "contextlib2" 'contextlib2;python_version<"3"' \ - --replace "path.py" "path" - ''; - - buildInputs = [ - pytest + # imp was removed in Python 3.12 + patches = [ + (fetchpatch { + name = "stop-using-imp.patch"; + url = "https://build.opensuse.org/public/source/openSUSE:Factory/python-pytest-shutil/stop-using-imp.patch?rev=10"; + hash = "sha256-L8tXoQ9q8o6aP3TpJY/sUVVbUd/ebw0h6de6dBj1WNY="; + stripLen = 1; + }) ]; - propagatedBuildInputs = [ + build-system = [ + setuptools setuptools-git + ]; + + buildInputs = [ pytest ]; + + dependencies = [ mock path execnet @@ -49,7 +53,6 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ - cmdline pytestCheckHook ]; From 44f4e956738dcdffd5534743136b34b770a40b7f Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sun, 12 May 2024 16:42:07 +0200 Subject: [PATCH 3/4] python312Packages.pytest-server-fixtures: 1.7.1 -> 1.7.1-unstable-2022-10-03 --- .../pytest-server-fixtures/default.nix | 43 +++++++++++++------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/pytest-server-fixtures/default.nix b/pkgs/development/python-modules/pytest-server-fixtures/default.nix index 29f26251b022c5..1466371e1af441 100644 --- a/pkgs/development/python-modules/pytest-server-fixtures/default.nix +++ b/pkgs/development/python-modules/pytest-server-fixtures/default.nix @@ -1,26 +1,45 @@ -{ lib, buildPythonPackage, fetchPypi -, pytest, pytest-shutil, pytest-fixture-config, psutil -, requests, future, retry }: +{ + lib, + buildPythonPackage, + fetchFromGitHub, + future, + psutil, + pytest, + pytest-shutil, + pytest-fixture-config, + requests, + retry, + six, + setuptools, +}: buildPythonPackage rec { pname = "pytest-server-fixtures"; - version = "1.7.1"; - format = "setuptools"; + inherit (pytest-fixture-config) version src; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-xecz0gqNDnc8pRPjYOS6JkeVLqlCj6K9BVFsYoHqPOc="; - }; + sourceRoot = "${src.name}/pytest-server-fixtures"; + + build-system = [ setuptools ]; buildInputs = [ pytest ]; - propagatedBuildInputs = [ pytest-shutil pytest-fixture-config psutil requests future retry ]; - # RuntimeError: Unable to find a free server number to start Xvfb + dependencies = [ + future + psutil + pytest-shutil + pytest-fixture-config + requests + retry + six + ]; + + # Don't run intergration tests doCheck = false; meta = with lib; { description = "Extensible server fixures for py.test"; - homepage = "https://github.com/manahl/pytest-plugins"; + homepage = "https://github.com/manahl/pytest-plugins"; license = licenses.mit; maintainers = with maintainers; [ ]; }; From 143bc2fa8f0ae68bc4ddca49fb400aa832737b6e Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sun, 12 May 2024 16:42:32 +0200 Subject: [PATCH 4/4] python312Packages.pytest-virtualenv: 1.7.0 -> 1.7.1-unstable-2022-10-03 --- .../pytest-virtualenv/default.nix | 46 ++++++++++++++----- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/pytest-virtualenv/default.nix b/pkgs/development/python-modules/pytest-virtualenv/default.nix index 408430d5127c2b..494209517eb319 100644 --- a/pkgs/development/python-modules/pytest-virtualenv/default.nix +++ b/pkgs/development/python-modules/pytest-virtualenv/default.nix @@ -1,21 +1,43 @@ -{ lib, buildPythonPackage, fetchPypi -, pytest, pytest-cov, mock, cmdline, pytest-fixture-config, pytest-shutil, virtualenv }: +{ + lib, + buildPythonPackage, + cmdline, + importlib-metadata, + mock, + pytestCheckHook, + pytest, + pytest-fixture-config, + pytest-shutil, + setuptools, + virtualenv, +}: buildPythonPackage rec { pname = "pytest-virtualenv"; - version = "1.7.0"; - format = "setuptools"; + inherit (pytest-fixture-config) version src; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "03w2zz3crblj1p6i8nq17946hbn3zqp9z7cfnifw47hi4a4fww12"; - }; + sourceRoot = "${src.name}/pytest-virtualenv"; + + build-system = [ setuptools ]; + + buildInputs = [ pytest ]; + + dependencies = [ + importlib-metadata + pytest-fixture-config + pytest-shutil + virtualenv + ]; - nativeCheckInputs = [ pytest pytest-cov mock cmdline ]; - propagatedBuildInputs = [ pytest-fixture-config pytest-shutil virtualenv ]; - checkPhase = "py.test tests/unit "; + nativeCheckInputs = [ + cmdline + mock + pytestCheckHook + ]; - nativeBuildInputs = [ pytest ]; + # Don't run integration tests + disabledTestPaths = [ "tests/integration/*" ]; meta = with lib; { description = "Create a Python virtual environment in your test that cleans up on teardown. The fixture has utility methods to install packages and list what’s installed.";