summary refs log tree commit diff
path: root/pkgs/development/interpreters/python/hooks/egg-install-hook.sh
blob: ae894fb1bde4bb50da556f6c3eface165d2bc31a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Setup hook for eggs
echo "Sourcing egg-install-hook"

eggInstallPhase() {
    echo "Executing eggInstallPhase"
    runHook preInstall

    mkdir -p "$out/@pythonSitePackages@"
    export PYTHONPATH="$out/@pythonSitePackages@:$PYTHONPATH"

    find
    @pythonInterpreter@ -m easy_install --prefix="$out" *.egg

    runHook postInstall
    echo "Finished executing eggInstallPhase"
}

if [ -z "${dontUseEggInstall-}" ] && [ -z "${installPhase-}" ]; then
    echo "Using eggInstallPhase"
    installPhase=eggInstallPhase
fi