From 4f47cccfa8534a4d1e0d3a613bf8610247616f25 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 25 Nov 2015 16:30:57 +0100 Subject: [PATCH] fix brew path --- prepare.sh | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/prepare.sh b/prepare.sh index 59c772d..a505988 100755 --- a/prepare.sh +++ b/prepare.sh @@ -2,23 +2,19 @@ cd `dirname $0` set -e -if [ ! -e ~/.local ]; then - mkdir -p ~/.local - curl -L https://github.com/Homebrew/homebrew/tarball/master | tar xz --strip 1 -C ~/.local - mkdir -p ~/.local - mkdir homebrew && curl -L https://github.com/Homebrew/homebrew/tarball/master | tar xz --strip 1 -C ~/.local +brew=$HOME/.local +prefix=$HOME/python - cat >> ~/.bashrc << EOF -. ~/.bash_profile -EOF - cat >> ~/.bash_profile << EOF -export PATH="$HOME/.local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin" +export PATH="$brew/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin" export HOMEBREW_CACHE="$HOME/Library/Caches/Homebrew" -EOF - . ~/.bash_profile + +if [ ! -e $brew ]; then + mkdir -p $brew + curl -L https://github.com/Homebrew/homebrew/tarball/master | tar xz --strip 1 -C $brew + mkdir -p $brew + mkdir homebrew && curl -L https://github.com/Homebrew/homebrew/tarball/master | tar xz --strip 1 -C $brew brew update fi - brew install openssl brew install sqlite brew install xz @@ -33,18 +29,13 @@ brew link libxslt --force curl https://git.0x2620.org/openmedialibrary.git/blob_plain/HEAD:/requirements.txt > requirements.txt pip3 install -r requirements.txt -tar xf ~/Library/Caches/Homebrew/python3-3.5.0.tar.xz -cd Python-3.5.0 -patch -p1 < ~/Library/Caches/Homebrew/python3--patch-029cc0dc72b1bcf4ddc5f913cc4a3fd970378073c6355921891f041aca2f8b12.diff - -prefix=$HOME/python -./configure \ - --prefix=$prefix \ - --enable-ipv6 \ - --datarootdir=$prefix/share \ - --datadir=$prefix/share \ - --without-gcc MACOSX_DEPLOYMENT_TARGET=10.11 +name=Python-3.5.0 +rm -rf $name +tar xf $HOMEBREW_CACHE/python3-3.5.0.tar.xz +cd $name +patch -p1 < $HOMEBREW_CACHE/python3--patch-029cc0dc72b1bcf4ddc5f913cc4a3fd970378073c6355921891f041aca2f8b12.diff +export PATH="$prefix/bin:$PATH" CPPFLAGS="-I$brew/opt/openssl/include/openssl" LDFLAGS="" for pkg in openssl sqlite readline gdbm xz; do @@ -53,5 +44,13 @@ for pkg in openssl sqlite readline gdbm xz; do done export CPPFLAGS export LDFLAGS + +./configure \ + --prefix=$prefix \ + --enable-ipv6 \ + --datarootdir=$prefix/share \ + --datadir=$prefix/share \ + --without-gcc MACOSX_DEPLOYMENT_TARGET=10.11 + make make install PYTHONAPPSDIR=$prefix