Merge pull request #310905 from TomaSajt/pytest-shutil

python312Packages.pytest-{fixture-config,shutil,server-fixtures,virtualenv}: * -> 1.7.1-unstable-2022-10-03

authored by Weijia Wang and committed by GitHub 27713bdb a07fc872

+110 -53
+21 -8
pkgs/development/python-modules/pytest-fixture-config/default.nix
··· 1 - { lib, buildPythonPackage, fetchPypi 2 - , setuptools-git, pytest }: 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + setuptools, 6 + setuptools-git, 7 + pytest, 8 + }: 3 9 4 10 buildPythonPackage rec { 5 11 pname = "pytest-fixture-config"; 6 - version = "1.7.0"; 7 - format = "setuptools"; 12 + version = "1.7.1-unstable-2022-10-03"; 13 + pyproject = true; 8 14 9 - src = fetchPypi { 10 - inherit pname version; 11 - sha256 = "13i1qpz22w3x4dmw8vih5jdnbqfqvl7jiqs0dg764s0zf8bp98a1"; 15 + src = fetchFromGitHub { 16 + owner = "man-group"; 17 + repo = "pytest-plugins"; 18 + rev = "5f9b88a65a8c1e506885352bbd9b2a47900f5014"; 19 + hash = "sha256-huN3RzwtfVf4iMJ96VRP/ldOxTUlUMF1wJIdbcGXHn4="; 12 20 }; 13 21 14 - nativeBuildInputs = [ setuptools-git ]; 22 + sourceRoot = "${src.name}/pytest-fixture-config"; 23 + 24 + nativeBuildInputs = [ 25 + setuptools 26 + setuptools-git 27 + ]; 15 28 16 29 buildInputs = [ pytest ]; 17 30
+31 -12
pkgs/development/python-modules/pytest-server-fixtures/default.nix
··· 1 - { lib, buildPythonPackage, fetchPypi 2 - , pytest, pytest-shutil, pytest-fixture-config, psutil 3 - , requests, future, retry }: 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + future, 6 + psutil, 7 + pytest, 8 + pytest-shutil, 9 + pytest-fixture-config, 10 + requests, 11 + retry, 12 + six, 13 + setuptools, 14 + }: 4 15 5 16 buildPythonPackage rec { 6 17 pname = "pytest-server-fixtures"; 7 - version = "1.7.1"; 8 - format = "setuptools"; 18 + inherit (pytest-fixture-config) version src; 19 + pyproject = true; 20 + 21 + sourceRoot = "${src.name}/pytest-server-fixtures"; 9 22 10 - src = fetchPypi { 11 - inherit pname version; 12 - sha256 = "sha256-xecz0gqNDnc8pRPjYOS6JkeVLqlCj6K9BVFsYoHqPOc="; 13 - }; 23 + build-system = [ setuptools ]; 14 24 15 25 buildInputs = [ pytest ]; 16 - propagatedBuildInputs = [ pytest-shutil pytest-fixture-config psutil requests future retry ]; 26 + 27 + dependencies = [ 28 + future 29 + psutil 30 + pytest-shutil 31 + pytest-fixture-config 32 + requests 33 + retry 34 + six 35 + ]; 17 36 18 - # RuntimeError: Unable to find a free server number to start Xvfb 37 + # Don't run intergration tests 19 38 doCheck = false; 20 39 21 40 meta = with lib; { 22 41 description = "Extensible server fixures for py.test"; 23 - homepage = "https://github.com/manahl/pytest-plugins"; 42 + homepage = "https://github.com/manahl/pytest-plugins"; 24 43 license = licenses.mit; 25 44 maintainers = with maintainers; [ ]; 26 45 };
+24 -21
pkgs/development/python-modules/pytest-shutil/default.nix
··· 1 1 { lib 2 2 , isPyPy 3 3 , buildPythonPackage 4 - , fetchPypi 4 + , pytest-fixture-config 5 + , fetchpatch 5 6 6 - # build 7 - , pytest 7 + # build-time 8 + , setuptools 9 + , setuptools-git 8 10 9 11 # runtime 10 - , setuptools-git 12 + , pytest 11 13 , mock 12 14 , path 13 15 , execnet ··· 15 17 , six 16 18 17 19 # tests 18 - , cmdline 19 20 , pytestCheckHook 20 21 }: 21 22 22 23 buildPythonPackage rec { 23 24 pname = "pytest-shutil"; 24 - version = "1.7.0"; 25 - format = "setuptools"; 25 + inherit (pytest-fixture-config) version src; 26 + pyproject = true; 26 27 27 - src = fetchPypi { 28 - inherit pname version; 29 - hash = "sha256-2BZSYd5251CFBcNB2UwCsRPclj8nRUOrynTb+r0CEmE="; 30 - }; 28 + sourceRoot = "${src.name}/pytest-shutil"; 31 29 32 - postPatch = '' 33 - substituteInPlace setup.py \ 34 - --replace "contextlib2" 'contextlib2;python_version<"3"' \ 35 - --replace "path.py" "path" 36 - ''; 37 - 38 - buildInputs = [ 39 - pytest 30 + # imp was removed in Python 3.12 31 + patches = [ 32 + (fetchpatch { 33 + name = "stop-using-imp.patch"; 34 + url = "https://build.opensuse.org/public/source/openSUSE:Factory/python-pytest-shutil/stop-using-imp.patch?rev=10"; 35 + hash = "sha256-L8tXoQ9q8o6aP3TpJY/sUVVbUd/ebw0h6de6dBj1WNY="; 36 + stripLen = 1; 37 + }) 40 38 ]; 41 39 42 - propagatedBuildInputs = [ 40 + build-system = [ 41 + setuptools 43 42 setuptools-git 43 + ]; 44 + 45 + buildInputs = [ pytest ]; 46 + 47 + dependencies = [ 44 48 mock 45 49 path 46 50 execnet ··· 49 53 ]; 50 54 51 55 nativeCheckInputs = [ 52 - cmdline 53 56 pytestCheckHook 54 57 ]; 55 58
+34 -12
pkgs/development/python-modules/pytest-virtualenv/default.nix
··· 1 - { lib, buildPythonPackage, fetchPypi 2 - , pytest, pytest-cov, mock, cmdline, pytest-fixture-config, pytest-shutil, virtualenv }: 1 + { 2 + lib, 3 + buildPythonPackage, 4 + cmdline, 5 + importlib-metadata, 6 + mock, 7 + pytestCheckHook, 8 + pytest, 9 + pytest-fixture-config, 10 + pytest-shutil, 11 + setuptools, 12 + virtualenv, 13 + }: 3 14 4 15 buildPythonPackage rec { 5 16 pname = "pytest-virtualenv"; 6 - version = "1.7.0"; 7 - format = "setuptools"; 17 + inherit (pytest-fixture-config) version src; 18 + pyproject = true; 8 19 9 - src = fetchPypi { 10 - inherit pname version; 11 - sha256 = "03w2zz3crblj1p6i8nq17946hbn3zqp9z7cfnifw47hi4a4fww12"; 12 - }; 20 + sourceRoot = "${src.name}/pytest-virtualenv"; 21 + 22 + build-system = [ setuptools ]; 23 + 24 + buildInputs = [ pytest ]; 25 + 26 + dependencies = [ 27 + importlib-metadata 28 + pytest-fixture-config 29 + pytest-shutil 30 + virtualenv 31 + ]; 13 32 14 - nativeCheckInputs = [ pytest pytest-cov mock cmdline ]; 15 - propagatedBuildInputs = [ pytest-fixture-config pytest-shutil virtualenv ]; 16 - checkPhase = "py.test tests/unit "; 33 + nativeCheckInputs = [ 34 + cmdline 35 + mock 36 + pytestCheckHook 37 + ]; 17 38 18 - nativeBuildInputs = [ pytest ]; 39 + # Don't run integration tests 40 + disabledTestPaths = [ "tests/integration/*" ]; 19 41 20 42 meta = with lib; { 21 43 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.";