Skip to content

Commit

Permalink
Add 'install psutil' step after installation to build the python lib.
Browse files Browse the repository at this point in the history
  • Loading branch information
trestletech committed Oct 29, 2014
1 parent 0bec4d2 commit e89032a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packaging/debian-control/postinst.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
# errors shouldn't cause script to exit
set +e

# install psutil
METRICS_DIR=${CMAKE_INSTALL_PREFIX}/shiny-server/ext/metrics
LOCAL_PACKAGES=$METRICS_DIR/local-packages
mkdir -p $LOCAL_PACKAGES
sudo bash <<EOF
cd $METRICS_DIR/external/psutil
PYTHONPATH=$LOCAL_PACKAGES python setup.py install --install-purelib=$LOCAL_PACKAGES --install-platlib=$LOCAL_PACKAGES > /dev/null
EOF

sudo ln -f -s "${CMAKE_INSTALL_PREFIX}/shiny-server/bin/shiny-server" /usr/bin/shiny-server
# See if "shiny" user exists
if id -u shiny >/dev/null 2>&1;
Expand Down
7 changes: 7 additions & 0 deletions packaging/rpm-script/postinst.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
# errors shouldn't cause script to exit
set +e

# Install psutil
METRICS_DIR=${CMAKE_INSTALL_PREFIX}/shiny-server/ext/metrics
LOCAL_PACKAGES=$METRICS_DIR/local-packages
mkdir -p $LOCAL_PACKAGES
cd $METRICS_DIR/external/psutil
PYTHONPATH=$LOCAL_PACKAGES python setup.py install --install-purelib=$LOCAL_PACKAGES --install-platlib=$LOCAL_PACKAGES > /dev/null

sudo ln -f -s "${CMAKE_INSTALL_PREFIX}/shiny-server/bin/shiny-server" /usr/bin/shiny-server
# See if "shiny" user exists
if id -u shiny >/dev/null 2>&1;
Expand Down

0 comments on commit e89032a

Please sign in to comment.