Files
2026-04-20 00:28:40 +02:00

45 lines
976 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
cython,
pytestCheckHook,
}:
buildPythonPackage (finalAttrs: {
pname = "cymem";
version = "2.0.14";
pyproject = true;
src = fetchFromGitHub {
owner = "explosion";
repo = "cymem";
tag = "release-v${finalAttrs.version}";
hash = "sha256-pb7AWkCOLfoH2kLNNwIxxHyGsxCpq72Qzid4aCYu9XM=";
};
build-system = [
setuptools
cython
];
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
# remove src module, so tests use the installed module instead
mv ./cymem/tests ./tests
rm -r ./cymem
'';
pythonImportsCheck = [ "cymem" ];
meta = {
description = "Cython memory pool for RAII-style memory management";
homepage = "https://github.com/explosion/cymem";
changelog = "https://github.com/explosion/cymem/releases/tag/release-${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ nickcao ];
};
})