python3.pkgs.pypaBuildHook: switch to pyproject-build

Upstream's recommended "python -m build" way of invoking build fails
when the working directory contains a file named "build.py". This is
common for poetry projects that build C extensions.
This commit is contained in:
Theodore Ni
2023-08-20 10:59:46 +02:00
committed by Frederik Rietdijk
parent a4d66bcc5f
commit 93d25dda84
2 changed files with 4 additions and 6 deletions
@@ -67,11 +67,9 @@ in {
makePythonHook {
name = "pypa-build-hook.sh";
propagatedBuildInputs = [ build wheel ];
substitutions = {
inherit pythonInterpreter;
};
} ./pypa-build-hook.sh) {};
} ./pypa-build-hook.sh) {
inherit (pythonForBuild.pkgs) build;
};
pipInstallHook = callPackage ({ makePythonHook, pip }:
makePythonHook {
@@ -6,7 +6,7 @@ pypaBuildPhase() {
runHook preBuild
echo "Creating a wheel..."
@pythonInterpreter@ -m build --no-isolation --outdir dist/ --wheel $pypaBuildFlags
pyproject-build --no-isolation --outdir dist/ --wheel $pypaBuildFlags
echo "Finished creating a wheel..."
runHook postBuild