Files
nixpkgs/pkgs/development/python-modules/cymem/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01: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-4srwdQS06KeBAIaJm6XxmsHEZto0eiXBznrCHgT/BAc=";
};
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 ];
};
}