This fixes the build for keyutils on Python 3.11 and higher. It appears this package is affected by changes that were made to CPython that were causing code generated by certain earlier versions of Cython to fail. This update simply re-generates the relevant code with the up-to-date Cython 0.29.x series during the pre-build phase, allowing the build to succeed. Fixes #263482. Fixes #263506. Co-authored-by: Robert Schütz <github@dotlambda.de> Co-authored-by: Martin Weinelt <mweinelt@users.noreply.github.com>
46 lines
904 B
Nix
46 lines
904 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, cython
|
|
, fetchFromGitHub
|
|
, keyutils
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "keyutils";
|
|
version = "0.6";
|
|
|
|
# github version comes bundled with tests
|
|
src = fetchFromGitHub {
|
|
owner = "sassoftware";
|
|
repo = "python-keyutils";
|
|
rev = version;
|
|
sha256 = "0pfqfr5xqgsqkxzrmj8xl2glyl4nbq0irs0k6ik7iy3gd3mxf5g1";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py --replace '"pytest-runner"' ""
|
|
'';
|
|
|
|
preBuild = ''
|
|
cython keyutils/_keyutils.pyx
|
|
'';
|
|
|
|
preCheck = ''
|
|
rm -rf keyutils
|
|
'';
|
|
|
|
buildInputs = [ keyutils ];
|
|
nativeBuildInputs = [ cython ];
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
meta = {
|
|
description = "A set of python bindings for keyutils";
|
|
homepage = "https://github.com/sassoftware/python-keyutils";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ primeos ];
|
|
};
|
|
}
|