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:
committed by
Frederik Rietdijk
parent
a4d66bcc5f
commit
93d25dda84
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user