2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildPythonPackage,
|
|
|
|
setuptools,
|
|
|
|
pytestCheckHook,
|
|
|
|
sortedcontainers,
|
2024-01-13 08:15:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "strct";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.0.34";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "shaypal5";
|
|
|
|
repo = "strct";
|
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-uPM2U+emZUCGqEhIeTBmaOu8eSfK4arqvv9bItBWpUs=";
|
2024-01-13 08:15:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2024-05-15 15:35:15 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail \
|
|
|
|
'"--cov' \
|
|
|
|
'#"--cov'
|
2024-01-13 08:15:51 +00:00
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
# don't append .dev0 to version
|
|
|
|
env.RELEASING_PROCESS = "1";
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
sortedcontainers
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"strct"
|
|
|
|
"strct.dicts"
|
|
|
|
"strct.hash"
|
|
|
|
"strct.lists"
|
|
|
|
"strct.sets"
|
|
|
|
"strct.sortedlists"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Small pure-python package for data structure related utility functions";
|
2024-01-13 08:15:51 +00:00
|
|
|
homepage = "https://github.com/shaypal5/strct";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ pbsds ];
|
|
|
|
};
|
|
|
|
}
|