2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
colorama,
|
|
|
|
pytest,
|
|
|
|
pytestCheckHook,
|
2021-08-08 23:34:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-resource-path";
|
|
|
|
version = "1.3.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-08-08 23:34:03 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yukihiko-shinoda";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1siv3pk4fsabz254fdzr7c0pxy124habnbw4ym66pfk883fr96g2";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "pytest-runner" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ pytest ];
|
2021-08-08 23:34:03 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ colorama ];
|
2021-08-08 23:34:03 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-08-08 23:34:03 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pytest_resource_path" ];
|
2021-08-08 23:34:03 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Pytest plugin to provide path for uniform access to test resources";
|
|
|
|
homepage = "https://github.com/yukihiko-shinoda/pytest-resource-path";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|