packaging: only wrap external dependency scripts.
- external scripts require the full PYTHONPATH from whole tree - internal scripts are pre-wrapped, and don't require additional wrapping - this makes execution of scripts roughly 5x faster due to much smaller PATH tree
This commit is contained in:
parent
a04521fd81
commit
86f4390058
1 changed files with 18 additions and 6 deletions
24
default.nix
24
default.nix
|
|
@ -205,16 +205,28 @@ let
|
|||
mkdir -p $out/bin
|
||||
|
||||
# required binaries from dependencies
|
||||
#ln -s ${self.python}/bin/python $out/bin
|
||||
ln -s ${self.pyramid}/bin/* $out/bin/
|
||||
ln -s ${self.gunicorn}/bin/gunicorn $out/bin/
|
||||
ln -s ${self.supervisor}/bin/supervisor* $out/bin/
|
||||
ln -s ${self.supervisor}/bin/supervisorctl $out/bin/
|
||||
ln -s ${self.supervisor}/bin/supervisord $out/bin/
|
||||
ln -s ${self.pastescript}/bin/paster $out/bin/
|
||||
ln -s ${self.channelstream}/bin/channelstream $out/bin/
|
||||
ln -s ${self.celery}/bin/celery $out/bin/
|
||||
echo "[DONE]: created symlinks into $out/bin"
|
||||
ln -s ${self.gunicorn}/bin/gunicorn $out/bin/
|
||||
ln -s ${self.pyramid}/bin/prequest $out/bin/
|
||||
ln -s ${self.pyramid}/bin/pserve $out/bin/
|
||||
|
||||
for file in $out/bin/*;
|
||||
echo "[DONE]: created symlinks into $out/bin"
|
||||
DEPS="$out/bin/supervisorctl \
|
||||
$out/bin/supervisord \
|
||||
$out/bin/paster \
|
||||
$out/bin/channelstream \
|
||||
$out/bin/celery \
|
||||
$out/bin/gunicorn \
|
||||
$out/bin/prequest \
|
||||
$out/bin/pserve"
|
||||
|
||||
# wrap only dependency scripts, they require to have full PYTHONPATH set
|
||||
# to be able to import all packages
|
||||
for file in $DEPS;
|
||||
do
|
||||
wrapProgram $file \
|
||||
--prefix PATH : $PATH \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue