diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2021-08-22 09:03:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-22 09:03:30 +0200 |
commit | 4d81763c3bc5ee6276dd530967eeaf21151c4a2f (patch) | |
tree | b01a6a7caa87f6bbfd1a348211ae8cc414917ef4 | |
parent | ee46a3890e1ecdb49a81d08ec65500dda04e97db (diff) | |
parent | 72ce588eb594e1f9fa16f1f1e1f38c65efda440f (diff) |
Merge pull request #135106 from fabaff/bump-pytest-socket
python3Packages.pytest-socket: 0.3.3 -> 0.4.0
-rw-r--r-- | pkgs/development/python-modules/pytest-socket/default.nix | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/pytest-socket/default.nix b/pkgs/development/python-modules/pytest-socket/default.nix index 05f632d39ba3b..0371b7cac5a42 100644 --- a/pkgs/development/python-modules/pytest-socket/default.nix +++ b/pkgs/development/python-modules/pytest-socket/default.nix @@ -1,20 +1,29 @@ { lib , buildPythonPackage , fetchFromGitHub +, fetchpatch +, poetry-core , pytest +, pythonOlder }: buildPythonPackage rec { pname = "pytest-socket"; - version = "0.3.3"; + version = "0.4.0"; + disabled = pythonOlder "3.6"; + format = "pyproject"; src = fetchFromGitHub { owner = "miketheman"; repo = pname; rev = version; - sha256 = "1jbzkyp4xki81h01yl4vg3nrg9b6shsk1ryrmkaslffyhrqnj8zh"; + sha256 = "sha256-cFYtJqZ/RjFbn9XlEy6ffxZ2djisajQAwjV/YR2f59Q="; }; + nativeBuildInputs = [ + poetry-core + ]; + buildInputs = [ pytest ]; @@ -23,18 +32,24 @@ buildPythonPackage rec { pytest ]; - checkPhase = '' - pytest - ''; + patches = [ + # Switch to poetry-core, https://github.com/miketheman/pytest-socket/pull/74 + (fetchpatch { + name = "switch-to-poetry-core.patch"; + url = "https://github.com/miketheman/pytest-socket/commit/32519170e656e731d24b81770a170333d3efa6a8.patch"; + sha256 = "19ksgx77rsa6ijcbml74alwc5052mdqr4rmvqhlzvfcvv3676ig2"; + }) + ]; - # unsurprisingly pytest-socket require network for majority of tests - # to pass... + # pytest-socket require network for majority of tests doCheck = false; + pythonImportsCheck = [ "pytest_socket" ]; + meta = with lib; { description = "Pytest Plugin to disable socket calls during tests"; homepage = "https://github.com/miketheman/pytest-socket"; license = licenses.mit; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; } |