python311Packages.pytest-examples: init at 0.0.9
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
{ lib
|
||||
, black
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, hatchling
|
||||
, pytest
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, pythonRelaxDepsHook
|
||||
, ruff
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pytest-examples";
|
||||
version = "0.0.9";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pydantic";
|
||||
repo = "pytest-examples";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-ecxSLbPnHdL60vlc7EjKmw5rATTePqJCa5QIdyxevv0=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# ruff binary is used directly, the ruff Python package is not needed
|
||||
substituteInPlace pytest_examples/lint.py \
|
||||
--replace "'ruff'" "'${ruff}/bin/ruff'"
|
||||
'';
|
||||
|
||||
pythonRemoveDeps = [
|
||||
"ruff"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
hatchling
|
||||
pythonRelaxDepsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
pytest
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
black
|
||||
ruff
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"pytest_examples"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Pytest plugin for testing examples in docstrings and markdown files";
|
||||
homepage = "https://github.com/pydantic/pytest-examples";
|
||||
changelog = "https://github.com/pydantic/pytest-examples/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
@@ -9715,6 +9715,8 @@ self: super: with self; {
|
||||
|
||||
pytest-error-for-skips = callPackage ../development/python-modules/pytest-error-for-skips { };
|
||||
|
||||
pytest-examples = callPackage ../development/python-modules/pytest-examples { };
|
||||
|
||||
pytest-expect = callPackage ../development/python-modules/pytest-expect { };
|
||||
|
||||
pytest-factoryboy = callPackage ../development/python-modules/pytest-factoryboy { };
|
||||
|
||||
Reference in New Issue
Block a user