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`
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue