python3.pkgs.pypaBuildHook: init
This commit is contained in:
committed by
Martin Weinelt
parent
1298c367b1
commit
6560d0086c
@@ -62,6 +62,16 @@ in {
|
||||
};
|
||||
} ./pip-build-hook.sh) {};
|
||||
|
||||
pypaBuildHook = callPackage ({ makePythonHook, build, wheel }:
|
||||
makePythonHook {
|
||||
name = "pypa-build-hook.sh";
|
||||
propagatedBuildInputs = [ build wheel ];
|
||||
substitutions = {
|
||||
inherit pythonInterpreter;
|
||||
};
|
||||
} ./pypa-build-hook.sh) {};
|
||||
|
||||
|
||||
pipInstallHook = callPackage ({ makePythonHook, pip }:
|
||||
makePythonHook {
|
||||
name = "pip-install-hook";
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Setup hook to use for pypa/build projects
|
||||
echo "Sourcing pypa-build-hook"
|
||||
|
||||
pypaBuildPhase() {
|
||||
echo "Executing pypaBuildPhase"
|
||||
runHook preBuild
|
||||
|
||||
echo "Creating a wheel..."
|
||||
@pythonInterpreter@ -m build --no-isolation --outdir dist/ --wheel $pypaBuildFlags
|
||||
echo "Finished creating a wheel..."
|
||||
|
||||
runHook postBuild
|
||||
echo "Finished executing pypaBuildPhase"
|
||||
}
|
||||
|
||||
if [ -z "${dontUsePypaBuild-}" ] && [ -z "${buildPhase-}" ]; then
|
||||
echo "Using pypaBuildPhase"
|
||||
buildPhase=pypaBuildPhase
|
||||
fi
|
||||
Reference in New Issue
Block a user