Unverified Commit 03170e3f authored by Chris Marchesi's avatar Chris Marchesi
Browse files

python311Packages.keyutils: fix build



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: default avatarRobert Schütz <github@dotlambda.de>
Co-authored-by: default avatarMartin Weinelt <mweinelt@users.noreply.github.com>
parent 93021a10
Loading
Loading
Loading
Loading
+19 −2
Original line number Diff line number Diff line
{ lib, buildPythonPackage, fetchFromGitHub, keyutils, pytest-runner, pytest }:
{ lib
, buildPythonPackage
, cython
, fetchFromGitHub
, keyutils
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "keyutils";
@@ -16,8 +22,19 @@ buildPythonPackage rec {
    substituteInPlace setup.py --replace '"pytest-runner"' ""
  '';

  preBuild = ''
    cython keyutils/_keyutils.pyx
  '';

  preCheck = ''
    rm -rf keyutils
  '';

  buildInputs = [ keyutils ];
  nativeCheckInputs = [ pytest pytest-runner ];
  nativeBuildInputs = [ cython ];
  nativeCheckInputs = [
    pytestCheckHook
  ];

  meta = {
    description = "A set of python bindings for keyutils";