mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-19 12:56:08 +00:00
Merge pull request #473 from sumitsahrawat/docker
Allow using pre-installed ipython
This commit is contained in:
commit
bd695daf71
@ -3,33 +3,35 @@
|
||||
# Installation for Linux (tested on Ubuntu 14.10) from IHaskell repo directory.
|
||||
# TODO Split out setup for installation from Hackage released versions.
|
||||
|
||||
ghc --version >& /dev/null
|
||||
if [ $? ]; then
|
||||
true
|
||||
else
|
||||
if [ -z "$(which ghc)" ]; then
|
||||
echo "Please install ghc."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cabal --version >& /dev/null
|
||||
if [ $? ]; then
|
||||
true
|
||||
else
|
||||
if [ -z "$(which cabal)" ]; then
|
||||
echo "Please install Cabal."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install IPython.
|
||||
# python-pip is out of date, causes problems, so we get the latest version
|
||||
# using easy_install instead.
|
||||
#sudo apt-get install python-pip
|
||||
sudo apt-get install -y python-dev
|
||||
# If ipython is installed, and has a major version >= 3, then use the
|
||||
# installed version. Otherwise we install from scratch.
|
||||
if [ -n "$(which ipython)" ] && { [ $(ipython --version | tr '.' ' ' | cut -f 1 -d ' ') -ge 3 ]; } then
|
||||
echo "Using ipython already installed:" "$(which ipython)"
|
||||
else
|
||||
# Install IPython.
|
||||
# python-pip is out of date, causes problems, so we get the latest version
|
||||
# using easy_install instead.
|
||||
#sudo apt-get install python-pip
|
||||
sudo apt-get install -y python-dev
|
||||
|
||||
# To get easy_install
|
||||
sudo apt-get install -y python-setuptools
|
||||
# To get easy_install
|
||||
sudo apt-get install -y python-setuptools
|
||||
|
||||
sudo easy_install -U pip
|
||||
sudo easy_install -U pip
|
||||
|
||||
# -H to use .cache in /root
|
||||
sudo -H pip install -U 'ipython[all]'
|
||||
# -H to use .cache in /root
|
||||
sudo -H pip install -U 'ipython[all]'
|
||||
fi
|
||||
|
||||
# Make sure to have basic tools installed.
|
||||
cabal update
|
||||
|
Loading…
x
Reference in New Issue
Block a user