forked from NixOS/nixpkgs
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python: Add support for installing Python eggs
- Loading branch information
1 parent
380220c
commit 2d6f1ff
Showing
7 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
pkgs/development/interpreters/python/hooks/egg-build-hook.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Setup hook to use for eggs | ||
echo "Sourcing egg-build-hook" | ||
|
||
eggBuildPhase() { | ||
echo "Executing eggBuildPhase" | ||
runHook preBuild | ||
|
||
runHook postBuild | ||
echo "Finished executing eggBuildPhase" | ||
} | ||
|
||
if [ -z "${dontUseEggBuild-}" ] && [ -z "${buildPhase-}" ]; then | ||
echo "Using eggBuildPhase" | ||
buildPhase=eggBuildPhase | ||
fi |
21 changes: 21 additions & 0 deletions
21
pkgs/development/interpreters/python/hooks/egg-install-hook.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
17 changes: 17 additions & 0 deletions
17
pkgs/development/interpreters/python/hooks/egg-unpack-hook.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Setup hook to use in case an egg is fetched | ||
echo "Sourcing egg setup hook" | ||
|
||
eggUnpackPhase(){ | ||
echo "Executing eggUnpackPhase" | ||
runHook preUnpack | ||
|
||
cp "$src" "$(stripHash "$src")" | ||
|
||
# runHook postUnpack # Calls find...? | ||
echo "Finished executing eggUnpackPhase" | ||
} | ||
|
||
if [ -z "${dontUseEggUnpack-}" ] && [ -z "${unpackPhase-}" ]; then | ||
echo "Using eggUnpackPhase" | ||
unpackPhase=eggUnpackPhase | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters