Files
nixpkgs/pkgs/development/python-modules/cymem/default.nix
T
Justin Restivo 7026f69149 python3Packages.cymem: fix src hash
sha256-4srwdQS06KeBAIaJm6XxmsHEZto0eiXBznrCHgT/BAc= -> sha256-kZHnfUNbDyw+LD/7GgtXa6ZssTkJG2PkcM+6YLFK5RQ=
2025-12-30 17:22:58 -05:00

48 lines
992 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
cython,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "cymem";
version = "2.0.11";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "explosion";
repo = "cymem";
tag = "release-v${version}";
hash = "sha256-kZHnfUNbDyw+LD/7GgtXa6ZssTkJG2PkcM+6YLFK5RQ=";
};
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-${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ nickcao ];
};
}