From 369b1aca85fe6d085843d3cc1a342aa8f96d1d5d Mon Sep 17 00:00:00 2001 From: Mauricio Collares Date: Wed, 17 Jan 2024 16:55:59 +0100 Subject: [PATCH] python311Packages.cypari2: fix build --- .../development/python-modules/cypari2/default.nix | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/cypari2/default.nix b/pkgs/development/python-modules/cypari2/default.nix index 5b5ca31e4d02..5a1096cb1505 100644 --- a/pkgs/development/python-modules/cypari2/default.nix +++ b/pkgs/development/python-modules/cypari2/default.nix @@ -30,20 +30,13 @@ buildPythonPackage rec { }) ]; - # This differs slightly from the default python installPhase in that it pip-installs - # "." instead of "*.whl". - # That is because while the default install phase succeeds to build the package, - # it fails to generate the file "auto_paridecl.pxd". - installPhase = '' - export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH" - - # install "." instead of "*.whl" - pip install . --no-index --no-warn-script-location --prefix="$out" --no-cache + preBuild = '' + # generate cythonized extensions (auto_paridecl.pxd is crucial) + ${python.pythonOnBuildForHost.interpreter} setup.py build_ext --inplace ''; nativeBuildInputs = [ pari - python.pythonOnBuildForHost.pkgs.pip ]; buildInputs = [ @@ -56,6 +49,7 @@ buildPythonPackage rec { ]; checkPhase = '' + test -f "$out/${python.sitePackages}/cypari2/auto_paridecl.pxd" make check '';