diff options
author | Chris Marchesi <chrism@vancluevertech.com> | 2023-10-25 20:10:05 -0700 |
---|---|---|
committer | Chris Marchesi <chrism@vancluevertech.com> | 2023-10-26 13:01:44 -0700 |
commit | 03170e3f52ca9c87dba791935985392e02dab302 (patch) | |
tree | 005e0adf73bb812c5a722b8bb4bb34e69046da37 | |
parent | 93021a1029cbcec41f1d1fe07aacc407c0e5705e (diff) | |
download | nixlib-03170e3f52ca9c87dba791935985392e02dab302.tar nixlib-03170e3f52ca9c87dba791935985392e02dab302.tar.gz nixlib-03170e3f52ca9c87dba791935985392e02dab302.tar.bz2 nixlib-03170e3f52ca9c87dba791935985392e02dab302.tar.lz nixlib-03170e3f52ca9c87dba791935985392e02dab302.tar.xz nixlib-03170e3f52ca9c87dba791935985392e02dab302.tar.zst nixlib-03170e3f52ca9c87dba791935985392e02dab302.zip |
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: Robert Schütz <github@dotlambda.de> Co-authored-by: Martin Weinelt <mweinelt@users.noreply.github.com>
-rw-r--r-- | pkgs/development/python-modules/keyutils/default.nix | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/keyutils/default.nix b/pkgs/development/python-modules/keyutils/default.nix index 031ae5a65c39..c387c10ebc34 100644 --- a/pkgs/development/python-modules/keyutils/default.nix +++ b/pkgs/development/python-modules/keyutils/default.nix @@ -1,4 +1,10 @@ -{ 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"; |