This commit splits the `buildPythonPackage` into multiple setup hooks. Generally, Python packages are built from source to wheels using `setuptools`. The wheels are then installed with `pip`. Tests were often called with `python setup.py test` but this is less common nowadays. Most projects now use a different entry point for running tests, typically `pytest` or `nosetests`. Since the wheel format was introduced more tools were built to generate these, e.g. `flit`. Since PEP 517 is provisionally accepted, defining a build-system independent format (`pyproject.toml`), `pip` can now use that format to execute the correct build-system. In the past I've added support for PEP 517 (`pyproject`) to the Python builder, resulting in a now rather large builder. Furthermore, it was not possible to reuse components elsewhere. Therefore, the builder is now split into multiple setup hooks. The `setuptoolsCheckHook` is included now by default but in time it should be removed from `buildPythonPackage` to make it easier to use another hook (curently one has to pass in `dontUseSetuptoolsCheck`).wip/yesman
parent
7d3b44c9be
commit
f7e28bf5d8
@ -1,31 +0,0 @@ |
||||
# This function provides generic bits to install a Python wheel. |
||||
|
||||
{ python |
||||
}: |
||||
|
||||
{ buildInputs ? [] |
||||
# Additional flags to pass to "pip install". |
||||
, installFlags ? [] |
||||
, ... } @ attrs: |
||||
|
||||
attrs // { |
||||
buildInputs = buildInputs ++ [ python.pythonForBuild.pkgs.bootstrapped-pip ]; |
||||
|
||||
configurePhase = attrs.configurePhase or '' |
||||
runHook preConfigure |
||||
runHook postConfigure |
||||
''; |
||||
|
||||
installPhase = attrs.installPhase or '' |
||||
runHook preInstall |
||||
|
||||
mkdir -p "$out/${python.sitePackages}" |
||||
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH" |
||||
|
||||
pushd dist |
||||
${python.pythonForBuild.pkgs.bootstrapped-pip}/bin/pip install *.whl --no-index --prefix=$out --no-cache ${toString installFlags} --build tmpbuild |
||||
popd |
||||
|
||||
runHook postInstall |
||||
''; |
||||
} |
@ -1,22 +0,0 @@ |
||||
# This function provides specific bits for building a flit-based Python package. |
||||
|
||||
{ python |
||||
, flit |
||||
}: |
||||
|
||||
{ ... } @ attrs: |
||||
|
||||
attrs // { |
||||
nativeBuildInputs = [ flit ]; |
||||
buildPhase = attrs.buildPhase or '' |
||||
runHook preBuild |
||||
flit build --format wheel |
||||
runHook postBuild |
||||
''; |
||||
|
||||
# Flit packages, like setuptools packages, might have tests. |
||||
installCheckPhase = attrs.checkPhase or '' |
||||
${python.interpreter} -m unittest discover |
||||
''; |
||||
doCheck = attrs.doCheck or true; |
||||
} |
@ -1,56 +0,0 @@ |
||||
# This function provides specific bits for building a setuptools-based Python package. |
||||
|
||||
{ lib |
||||
, python |
||||
}: |
||||
|
||||
{ |
||||
# Global options passed to "python setup.py" |
||||
setupPyGlobalFlags ? [] |
||||
# Build options passed to "build_ext" |
||||
# https://github.com/pypa/pip/issues/881 |
||||
# Rename to `buildOptions` because it is not setuptools specific? |
||||
, setupPyBuildFlags ? [] |
||||
# Execute before shell hook |
||||
, preShellHook ? "" |
||||
# Execute after shell hook |
||||
, postShellHook ? "" |
||||
, ... } @ attrs: |
||||
|
||||
let |
||||
pipGlobalFlagsString = lib.concatMapStringsSep " " (option: "--global-option ${option}") setupPyGlobalFlags; |
||||
pipBuildFlagsString = lib.concatMapStringsSep " " (option: "--build-option ${option}") setupPyBuildFlags; |
||||
in attrs // { |
||||
buildPhase = attrs.buildPhase or '' |
||||
runHook preBuild |
||||
mkdir -p dist |
||||
echo "Creating a wheel..." |
||||
${python.pythonForBuild.interpreter} -m pip wheel --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist ${pipGlobalFlagsString} ${pipBuildFlagsString} . |
||||
echo "Finished creating a wheel..." |
||||
runHook postBuild |
||||
''; |
||||
|
||||
installCheckPhase = '' |
||||
runHook preCheck |
||||
echo "No checkPhase defined. Either provide a checkPhase or disable tests in case tests are not available."; exit 1 |
||||
runHook postCheck |
||||
''; |
||||
|
||||
# With Python it's a common idiom to run the tests |
||||
# after the software has been installed. |
||||
doCheck = attrs.doCheck or true; |
||||
|
||||
shellHook = attrs.shellHook or '' |
||||
${preShellHook} |
||||
# Long-term setup.py should be dropped. |
||||
if [ -e pyproject.toml ]; then |
||||
tmp_path=$(mktemp -d) |
||||
export PATH="$tmp_path/bin:$PATH" |
||||
export PYTHONPATH="$tmp_path/${python.pythonForBuild.sitePackages}:$PYTHONPATH" |
||||
mkdir -p $tmp_path/${python.pythonForBuild.sitePackages} |
||||
${python.pythonForBuild.pkgs.bootstrapped-pip}/bin/pip install -e . --prefix $tmp_path >&2 |
||||
fi |
||||
${postShellHook} |
||||
''; |
||||
|
||||
} |
@ -1,60 +0,0 @@ |
||||
# This function provides specific bits for building a setuptools-based Python package. |
||||
|
||||
{ lib |
||||
, python |
||||
}: |
||||
|
||||
{ |
||||
# Global options passed to "python setup.py" |
||||
setupPyGlobalFlags ? [] |
||||
# Build options passed to "python setup.py build_ext" |
||||
# https://github.com/pypa/pip/issues/881 |
||||
, setupPyBuildFlags ? [] |
||||
# Execute before shell hook |
||||
, preShellHook ? "" |
||||
# Execute after shell hook |
||||
, postShellHook ? "" |
||||
, ... } @ attrs: |
||||
|
||||
let |
||||
# use setuptools shim (so that setuptools is imported before distutils) |
||||
# pip does the same thing: https://github.com/pypa/pip/pull/3265 |
||||
setuppy = ./run_setup.py; |
||||
|
||||
setupPyGlobalFlagsString = lib.concatStringsSep " " setupPyGlobalFlags; |
||||
setupPyBuildExtString = lib.optionalString (setupPyBuildFlags != []) ("build_ext " + (lib.concatStringsSep " " setupPyBuildFlags)); |
||||
|
||||
in attrs // { |
||||
# we copy nix_run_setup over so it's executed relative to the root of the source |
||||
# many project make that assumption |
||||
buildPhase = attrs.buildPhase or '' |
||||
runHook preBuild |
||||
cp ${setuppy} nix_run_setup |
||||
${python.pythonForBuild.interpreter} nix_run_setup ${setupPyGlobalFlagsString} ${setupPyBuildExtString} bdist_wheel |
||||
runHook postBuild |
||||
''; |
||||
|
||||
installCheckPhase = attrs.checkPhase or '' |
||||
runHook preCheck |
||||
${python.pythonForBuild.interpreter} nix_run_setup test |
||||
runHook postCheck |
||||
''; |
||||
|
||||
# Python packages that are installed with setuptools |
||||
# are typically distributed with tests. |
||||
# With Python it's a common idiom to run the tests |
||||
# after the software has been installed. |
||||
doCheck = attrs.doCheck or true; |
||||
|
||||
shellHook = attrs.shellHook or '' |
||||
${preShellHook} |
||||
if test -e setup.py; then |
||||
tmp_path=$(mktemp -d) |
||||
export PATH="$tmp_path/bin:$PATH" |
||||
export PYTHONPATH="$tmp_path/${python.pythonForBuild.sitePackages}:$PYTHONPATH" |
||||
mkdir -p $tmp_path/${python.pythonForBuild.sitePackages} |
||||
${python.pythonForBuild.pkgs.bootstrapped-pip}/bin/pip install -e . --prefix $tmp_path >&2 |
||||
fi |
||||
${postShellHook} |
||||
''; |
||||
} |
@ -1,20 +0,0 @@ |
||||
# This function provides specific bits for building a wheel-based Python package. |
||||
|
||||
{ |
||||
}: |
||||
|
||||
{ ... } @ attrs: |
||||
|
||||
attrs // { |
||||
unpackPhase = '' |
||||
mkdir dist |
||||
cp "$src" "dist/$(stripHash "$src")" |
||||
''; |
||||
|
||||
# Wheels are pre-compiled |
||||
buildPhase = attrs.buildPhase or ":"; |
||||
installCheckPhase = attrs.checkPhase or ":"; |
||||
|
||||
# Wheels don't have any checks to run |
||||
doCheck = attrs.doCheck or false; |
||||
} |
@ -1,48 +0,0 @@ |
||||
# This function provides a generic Python package builder, |
||||
# and can build packages that use distutils, setuptools or flit. |
||||
|
||||
{ lib |
||||
, config |
||||
, python |
||||
, wrapPython |
||||
, setuptools |
||||
, unzip |
||||
, ensureNewerSourcesForZipFilesHook |
||||
, toPythonModule |
||||
, namePrefix |
||||
, flit |
||||
, writeScript |
||||
, update-python-libraries |
||||
}: |
||||
|
||||
let |
||||
setuptools-specific = import ./build-python-package-setuptools.nix { inherit lib python; }; |
||||
pyproject-specific = import ./build-python-package-pyproject.nix { inherit lib python; }; |
||||
flit-specific = import ./build-python-package-flit.nix { inherit python flit; }; |
||||
wheel-specific = import ./build-python-package-wheel.nix { }; |
||||
common = import ./build-python-package-common.nix { inherit python; }; |
||||
mkPythonDerivation = import ./mk-python-derivation.nix { |
||||
inherit lib config python wrapPython setuptools unzip ensureNewerSourcesForZipFilesHook; |
||||
inherit toPythonModule namePrefix update-python-libraries; |
||||
}; |
||||
in |
||||
|
||||
{ |
||||
# Several package formats are supported. |
||||
# "setuptools" : Install a common setuptools/distutils based package. This builds a wheel. |
||||
# "wheel" : Install from a pre-compiled wheel. |
||||
# "flit" : Install a flit package. This builds a wheel. |
||||
# "other" : Provide your own buildPhase and installPhase. |
||||
format ? "setuptools" |
||||
, ... } @ attrs: |
||||
|
||||
let |
||||
formatspecific = |
||||
if format == "pyproject" then common (pyproject-specific attrs) |
||||
else if format == "setuptools" then common (setuptools-specific attrs) |
||||
else if format == "flit" then common (flit-specific attrs) |
||||
else if format == "wheel" then common (wheel-specific attrs) |
||||
else if format == "other" then {} |
||||
else throw "Unsupported format ${format}"; |
||||
|
||||
in mkPythonDerivation ( attrs // formatspecific ) |
@ -0,0 +1,95 @@ |
||||
# Hooks for building Python packages. |
||||
{ python |
||||
, callPackage |
||||
, makeSetupHook |
||||
}: |
||||
|
||||
let |
||||
pythonInterpreter = python.pythonForBuild.interpreter; |
||||
pythonSitePackages = python.sitePackages; |
||||
pythonCheckInterpreter = python.interpreter; |
||||
setuppy = ../run_setup.py; |
||||
in rec { |
||||
|
||||
flitBuildHook = callPackage ({ flit }: |
||||
makeSetupHook { |
||||
name = "flit-build-hook"; |
||||
deps = [ flit ]; |
||||
substitutions = { |
||||
inherit pythonInterpreter; |
||||
}; |
||||
} ./flit-build-hook.sh) {}; |
||||
|
||||
pipBuildHook = callPackage ({ pip }: |
||||
makeSetupHook { |
||||
name = "pip-build-hook.sh"; |
||||
deps = [ pip ]; |
||||
substitutions = { |
||||
inherit pythonInterpreter pythonSitePackages; |
||||
}; |
||||
} ./pip-build-hook.sh) {}; |
||||
|
||||
pipInstallHook = callPackage ({ pip }: |
||||
makeSetupHook { |
||||
name = "pip-install-hook"; |
||||
deps = [ pip ]; |
||||
substitutions = { |
||||
inherit pythonInterpreter pythonSitePackages; |
||||
}; |
||||
} ./pip-install-hook.sh) {}; |
||||
|
||||
pytestCheckHook = callPackage ({ pytest }: |
||||
makeSetupHook { |
||||
name = "pytest-check-hook"; |
||||
deps = [ pytest ]; |
||||
substitutions = { |
||||
inherit pythonCheckInterpreter; |
||||
}; |
||||
} ./pytest-check-hook.sh) {}; |
||||
|
||||
pythonCatchConflictsHook = callPackage ({ setuptools }: |
||||
makeSetupHook { |
||||
name = "python-catch-conflicts-hook"; |
||||
deps = [ setuptools ]; |
||||
substitutions = { |
||||
inherit pythonInterpreter; |
||||
catchConflicts=../catch_conflicts/catch_conflicts.py; |
||||
}; |
||||
} ./python-catch-conflicts-hook.sh) {}; |
||||
|
||||
pythonImportsCheckHook = callPackage ({}: |
||||
makeSetupHook { |
||||
name = "python-imports-check-hook.sh"; |
||||
substitutions = { |
||||
inherit pythonCheckInterpreter; |
||||
}; |
||||
} ./python-imports-check-hook.sh) {}; |
||||
|
||||
pythonRemoveBinBytecodeHook = callPackage ({ }: |
||||
makeSetupHook { |
||||
name = "python-remove-bin-bytecode-hook"; |
||||
} ./python-remove-bin-bytecode-hook.sh) {}; |
||||
|
||||
setuptoolsBuildHook = callPackage ({ setuptools, wheel }: |
||||
makeSetupHook { |
||||
name = "setuptools-setup-hook"; |
||||
deps = [ setuptools wheel ]; |
||||
substitutions = { |
||||
inherit pythonInterpreter pythonSitePackages setuppy; |
||||
}; |
||||
} ./setuptools-build-hook.sh) {}; |
||||
|
||||
setuptoolsCheckHook = callPackage ({ setuptools }: |
||||
makeSetupHook { |
||||
name = "setuptools-check-hook"; |
||||
deps = [ setuptools ]; |
||||
substitutions = { |
||||
inherit pythonCheckInterpreter setuppy; |
||||
}; |
||||
} ./setuptools-check-hook.sh) {}; |
||||
|
||||
wheelUnpackHook = callPackage ({ }: |
||||
makeSetupHook { |
||||
name = "wheel-unpack-hook.sh"; |
||||
} ./wheel-unpack-hook.sh) {}; |
||||
} |
@ -0,0 +1,15 @@ |
||||
# Setup hook for flit |
||||
echo "Sourcing flit-build-hook" |
||||
|
||||
flitBuildPhase () { |
||||
echo "Executing flitBuildPhase" |
||||
preBuild |
||||
@pythonInterpreter@ -m flit build --format wheel |
||||
postBuild |
||||
echo "Finished executing flitBuildPhase" |
||||
} |
||||
|
||||
if [ -z "$dontUseFlitBuild" ] && [ -z "$buildPhase" ]; then |
||||
echo "Using flitBuildPhase" |
||||
buildPhase=flitBuildPhase |
||||
fi |
@ -0,0 +1,42 @@ |
||||
# Setup hook to use for pip projects |
||||
echo "Sourcing pip-build-hook" |
||||
|
||||
pipBuildPhase() { |
||||
echo "Executing pipBuildPhase" |
||||
runHook preBuild |
||||
|
||||
mkdir -p dist |
||||
echo "Creating a wheel..." |
||||
@pythonInterpreter@ -m pip wheel --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist "$options" . |
||||
echo "Finished creating a wheel..." |
||||
|
||||
runHook postBuild |
||||
echo "Finished executing pipBuildPhase" |
||||
} |
||||
|
||||
pipShellHook() { |
||||
echo "Executing pipShellHook" |
||||
runHook preShellHook |
||||
|
||||
# Long-term setup.py should be dropped. |
||||
if [ -e pyproject.toml ]; then |
||||
tmp_path=$(mktemp -d) |
||||
export PATH="$tmp_path/bin:$PATH" |
||||
export PYTHONPATH="$tmp_path/@pythonSitePackages@:$PYTHONPATH" |
||||
mkdir -p "$tmp_path/@pythonSitePackages@" |
||||
@pythonInterpreter@ -m pip install -e . --prefix "$tmp_path" >&2 |
||||
fi |
||||
|
||||
runHook postShellHook |
||||
echo "Finished executing pipShellHook" |
||||
} |
||||
|
||||
if [ -z "$dontUsePipBuild" ] && [ -z "$buildPhase" ]; then |
||||
echo "Using pipBuildPhase" |
||||
buildPhase=pipBuildPhase |
||||
fi |
||||
|
||||
if [ -z "$shellHook" ]; then |
||||
echo "Using pipShellHook" |
||||
shellHook=pipShellHook |
||||
fi |
@ -0,0 +1,24 @@ |
||||
# Setup hook for pip. |
||||
echo "Sourcing pip-install-hook" |
||||
|
||||
declare -a pipInstallFlags |
||||
|
||||
pipInstallPhase() { |
||||
echo "Executing pipInstallPhase" |
||||
runHook preInstall |
||||
|
||||
mkdir -p "$out/@pythonSitePackages@" |
||||
export PYTHONPATH="$out/@pythonSitePackages@:$PYTHONPATH" |
||||
|
||||
pushd dist || return 1 |
||||
@pythonInterpreter@ -m pip install ./*.whl --no-index --prefix="$out" --no-cache $pipInstallFlags --build tmpbuild |
||||
popd || return 1 |
||||
|
||||
runHook postInstall |
||||
echo "Finished executing pipInstallPhase" |
||||
} |
||||
|
||||
if [ -z "$dontUsePipInstall" ] && [ -z "$installPhase" ]; then |
||||
echo "Using pipInstallPhase" |
||||
installPhase=pipInstallPhase |
||||
fi |
@ -0,0 +1,49 @@ |
||||
# Setup hook for pytest |
||||
echo "Sourcing pytest-check-hook" |
||||
|
||||
declare -ar disabledTests |
||||
|
||||
function _concatSep { |
||||
local result |
||||
local sep="$1" |
||||
local -n arr=$2 |
||||
for index in ${!arr[*]}; do |
||||
if [ $index -eq 0 ]; then |
||||
result="${arr[index]}" |
||||
else |
||||
result+=" $sep ${arr[index]}" |
||||
fi |
||||
done |
||||
echo "$result" |
||||
} |
||||
|
||||
function _pytestComputeDisabledTestsString () { |
||||
declare -a tests |
||||
local tests=($1) |
||||
local prefix="not " |
||||
prefixed=( "${tests[@]/#/$prefix}" ) |
||||
result=$(_concatSep "and" prefixed) |
||||
echo "$result" |
||||
} |
||||
|
||||
function pytestCheckPhase() { |
||||
echo "Executing pytestCheckPhase" |
||||
runHook preCheck |
||||
|
||||
# Compose arguments |
||||
args=" -m pytest" |
||||
if [ -n "$disabledTests" ]; then |
||||
disabledTestsString=$(_pytestComputeDisabledTestsString "${disabledTests[@]}") |
||||
args+=" -k \""$disabledTestsString"\"" |
||||
fi |
||||
args+=" ${pytestFlagsArray[@]}" |
||||
eval "@pythonCheckInterpreter@ $args" |
||||
|
||||
runHook postCheck |
||||
echo "Finished executing pytestCheckPhase" |
||||
} |
||||
|
||||
if [ -z "$dontUsePytestCheck" ] && [ -z "$installCheckPhase" ]; then |
||||
echo "Using pytestCheckPhase" |
||||
preDistPhases+=" pytestCheckPhase" |
||||
fi |
@ -0,0 +1,10 @@ |
||||
# Setup hook for detecting conflicts in Python packages |
||||
echo "Sourcing python-catch-conflicts-hook.sh" |
||||
|
||||
pythonCatchConflictsPhase() { |
||||
@pythonInterpreter@ @catchConflicts@ |
||||
} |
||||
|
||||
if [ -z "$dontUsePythonCatchConflicts" ]; then |
||||
preDistPhases+=" pythonCatchConflictsPhase" |
||||
fi |
@ -0,0 +1,16 @@ |
||||
# Setup hook for checking whether Python imports succeed |
||||
echo "Sourcing python-imports-check-hook.sh" |
||||
|
||||
pythonImportsCheckPhase () { |
||||
echo "Executing pythonImportsCheckPhase" |
||||
|
||||
if [ -n "$pythonImportsCheck" ]; then |
||||
echo "Check whether the following modules can be imported: $pythonImportsCheck" |
||||
cd $out && eval "@pythonCheckInterpreter@ -c 'import os; import importlib; list(map(lambda mod: importlib.import_module(mod), os.environ[\"pythonImportsCheck\"].split()))'" |
||||
fi |
||||
} |
||||
|
||||
if [ -z "$dontUsePythonImportsCheck" ]; then |
||||
echo "Using pythonImportsCheckPhase" |
||||
preDistPhases+=" pythonImportsCheckPhase" |
||||
fi |
@ -0,0 +1,17 @@ |
||||
# Setup hook for detecting conflicts in Python packages |
||||
echo "Sourcing python-remove-bin-bytecode-hook.sh" |
||||
|
||||
# Check if we have two packages with the same name in the closure and fail. |
||||
# If this happens, something went wrong with the dependencies specs. |
||||
# Intentionally kept in a subdirectory, see catch_conflicts/README.md. |
||||
|
||||
pythonRemoveBinBytecodePhase () { |
||||
if [ -d "$out/bin" ]; then |
||||
rm -rf "$out/bin/__pycache__" # Python 3 |
||||
find "$out/bin" -type f -name "*.pyc" -delete # Python 2 |
||||
fi |
||||
} |
||||
|
||||
if [ -z "$dontUsePythonRemoveBinBytecode" ]; then |
||||
preDistPhases+=" pythonRemoveBinBytecodePhase" |
||||
fi |
@ -0,0 +1,47 @@ |
||||
# Setup hook for setuptools. |
||||
echo "Sourcing setuptools-build-hook" |
||||
|
||||
setuptoolsBuildPhase() { |
||||
echo "Executing setuptoolsBuildPhase" |
||||
local args |
||||
runHook preBuild |
||||
|
||||
cp -f @setuppy@ nix_run_setup |
||||
args="" |
||||
if [ -n "$setupPyGlobalFlags" ]; then |
||||
args+="$setupPyGlobalFlags" |
||||
fi |
||||
if [ -n "$setupPyBuildFlags" ]; then |
||||
args+="build_ext $setupPyBuildFlags" |
||||
fi |
||||
eval "@pythonInterpreter@ nix_run_setup $args bdist_wheel" |
||||
|
||||
runHook postBuild |
||||
echo "Finished executing setuptoolsInstallPhase" |
||||
} |
||||
|
||||
setuptoolsShellHook() { |
||||
echo "Executing setuptoolsShellHook" |
||||
runHook preShellHook |
||||
|
||||
if test -e setup.py; then |
||||
tmp_path=$(mktemp -d) |
||||
export PATH="$tmp_path/bin:$PATH" |
||||
export PYTHONPATH="@pythonSitePackages@:$PYTHONPATH" |
||||
mkdir -p "$tmp_path/@pythonSitePackages@" |
||||
eval "@pythonInterpreter@ -m pip -e . --prefix $tmp_path >&2" |
||||
fi |
||||
|
||||
runHook postShellHook |
||||
echo "Finished executing setuptoolsShellHook" |
||||
} |
||||
|
||||
if [ -z "$dontUseSetuptoolsBuild" ] && [ -z "$buildPhase" ]; then |
||||
echo "Using setuptoolsBuildPhase" |
||||
buildPhase=setuptoolsBuildPhase |
||||
fi |
||||
|
||||
if [ -z "$dontUseSetuptoolsShellHook" ] && [ -z "$shellHook" ]; then |
||||
echo "Using setuptoolsShellHook" |
||||
shellHook=setuptoolsShellHook |
||||
fi |
@ -0,0 +1,18 @@ |
||||
# Setup hook for setuptools. |
||||
echo "Sourcing setuptools-check-hook" |
||||
|
||||
setuptoolsCheckPhase() { |
||||
echo "Executing setuptoolsCheckPhase" |
||||
runHook preCheck |
||||
|
||||
cp -f @setuppy@ nix_run_setup |
||||
@pythonCheckInterpreter@ nix_run_setup test |
||||
|
||||
runHook postCheck |
||||
echo "Finished executing setuptoolsCheckPhase" |
||||
} |
||||
|
||||
if [ -z "$dontUseSetuptoolsCheck" ] && [ -z "$installCheckPhase" ]; then |
||||
echo "Using setuptoolsCheckPhase" |
||||
preDistPhases+=" setuptoolsCheckPhase" |
||||
fi |
@ -0,0 +1,18 @@ |
||||
# Setup hook to use in case a wheel is fetched |
||||
echo "Sourcing wheel setup hook" |
||||
|
||||
wheelUnpackPhase(){ |
||||
echo "Executing wheelUnpackPhase" |
||||
runHook preUnpack |
||||
|
||||
mkdir -p dist |
||||
cp "$src" "dist/$(stripHash "$src")" |
||||
|
||||
# runHook postUnpack # Calls find...? |
||||
echo "Finished executing wheelUnpackPhase" |
||||
} |
||||
|
||||
if [ -z "$dontUseWheelUnpack" ] && [ -z "$unpackPhase" ]; then |
||||
echo "Using wheelUnpackPhase" |
||||
unpackPhase=wheelUnpackPhase |
||||
fi |
Loading…
Reference in new issue