fix brew path
This commit is contained in:
parent
ddba757427
commit
4f47cccfa8
1 changed files with 23 additions and 24 deletions
47
prepare.sh
47
prepare.sh
|
@ -2,23 +2,19 @@
|
||||||
cd `dirname $0`
|
cd `dirname $0`
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ ! -e ~/.local ]; then
|
brew=$HOME/.local
|
||||||
mkdir -p ~/.local
|
prefix=$HOME/python
|
||||||
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
|
|
||||||
|
|
||||||
cat >> ~/.bashrc << EOF
|
export PATH="$brew/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin"
|
||||||
. ~/.bash_profile
|
|
||||||
EOF
|
|
||||||
cat >> ~/.bash_profile << EOF
|
|
||||||
export PATH="$HOME/.local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin"
|
|
||||||
export HOMEBREW_CACHE="$HOME/Library/Caches/Homebrew"
|
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
|
brew update
|
||||||
fi
|
fi
|
||||||
|
|
||||||
brew install openssl
|
brew install openssl
|
||||||
brew install sqlite
|
brew install sqlite
|
||||||
brew install xz
|
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
|
curl https://git.0x2620.org/openmedialibrary.git/blob_plain/HEAD:/requirements.txt > requirements.txt
|
||||||
pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
|
|
||||||
tar xf ~/Library/Caches/Homebrew/python3-3.5.0.tar.xz
|
name=Python-3.5.0
|
||||||
cd Python-3.5.0
|
rm -rf $name
|
||||||
patch -p1 < ~/Library/Caches/Homebrew/python3--patch-029cc0dc72b1bcf4ddc5f913cc4a3fd970378073c6355921891f041aca2f8b12.diff
|
tar xf $HOMEBREW_CACHE/python3-3.5.0.tar.xz
|
||||||
|
cd $name
|
||||||
prefix=$HOME/python
|
patch -p1 < $HOMEBREW_CACHE/python3--patch-029cc0dc72b1bcf4ddc5f913cc4a3fd970378073c6355921891f041aca2f8b12.diff
|
||||||
./configure \
|
|
||||||
--prefix=$prefix \
|
|
||||||
--enable-ipv6 \
|
|
||||||
--datarootdir=$prefix/share \
|
|
||||||
--datadir=$prefix/share \
|
|
||||||
--without-gcc MACOSX_DEPLOYMENT_TARGET=10.11
|
|
||||||
|
|
||||||
|
export PATH="$prefix/bin:$PATH"
|
||||||
CPPFLAGS="-I$brew/opt/openssl/include/openssl"
|
CPPFLAGS="-I$brew/opt/openssl/include/openssl"
|
||||||
LDFLAGS=""
|
LDFLAGS=""
|
||||||
for pkg in openssl sqlite readline gdbm xz; do
|
for pkg in openssl sqlite readline gdbm xz; do
|
||||||
|
@ -53,5 +44,13 @@ for pkg in openssl sqlite readline gdbm xz; do
|
||||||
done
|
done
|
||||||
export CPPFLAGS
|
export CPPFLAGS
|
||||||
export LDFLAGS
|
export LDFLAGS
|
||||||
|
|
||||||
|
./configure \
|
||||||
|
--prefix=$prefix \
|
||||||
|
--enable-ipv6 \
|
||||||
|
--datarootdir=$prefix/share \
|
||||||
|
--datadir=$prefix/share \
|
||||||
|
--without-gcc MACOSX_DEPLOYMENT_TARGET=10.11
|
||||||
|
|
||||||
make
|
make
|
||||||
make install PYTHONAPPSDIR=$prefix
|
make install PYTHONAPPSDIR=$prefix
|
||||||
|
|
Loading…
Reference in a new issue