python3Packages.pytest-trio: modernize

This commit is contained in:
natsukium 2025-05-31 23:13:07 +09:00
parent fea1ab34b7
commit db8b2611a2
No known key found for this signature in database
GPG Key ID: CEAB012C83309CF0
2 changed files with 12 additions and 9 deletions

View File

@ -2,7 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
pythonOlder, setuptools,
trio, trio,
hypothesis, hypothesis,
outcome, outcome,
@ -12,19 +12,20 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "pytest-trio"; pname = "pytest-trio";
version = "0.8.0"; version = "0.8.0";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "python-trio"; owner = "python-trio";
repo = "pytest-trio"; repo = "pytest-trio";
rev = "v${version}"; tag = "v${version}";
sha256 = "sha256-gUH35Yk/pBD2EdCEt8D0XQKWU8BwmX5xtAW10qRhoYk="; hash = "sha256-gUH35Yk/pBD2EdCEt8D0XQKWU8BwmX5xtAW10qRhoYk=";
}; };
build-system = [ setuptools ];
buildInputs = [ pytest ]; buildInputs = [ pytest ];
propagatedBuildInputs = [ dependencies = [
trio trio
outcome outcome
]; ];
@ -43,10 +44,10 @@ buildPythonPackage rec {
pythonImportsCheck = [ "pytest_trio" ]; pythonImportsCheck = [ "pytest_trio" ];
meta = with lib; { meta = {
description = "Pytest plugin for trio"; description = "Pytest plugin for trio";
homepage = "https://github.com/python-trio/pytest-trio"; homepage = "https://github.com/python-trio/pytest-trio";
license = licenses.asl20; license = lib.licenses.asl20;
maintainers = with maintainers; [ hexa ]; maintainers = with lib.maintainers; [ hexa ];
}; };
} }

View File

@ -29,6 +29,8 @@
let let
# escape infinite recursion with pytest-trio # escape infinite recursion with pytest-trio
pytest-trio' = (pytest-trio.override { trio = null; }).overrideAttrs { pytest-trio' = (pytest-trio.override { trio = null; }).overrideAttrs {
# `pythonRemoveDeps` is not working properly
dontCheckRuntimeDeps = true;
doCheck = false; doCheck = false;
pythonImportsCheck = [ ]; pythonImportsCheck = [ ];
}; };