switch to python3
This commit is contained in:
parent
752f00a656
commit
8895f9bf17
7 changed files with 21 additions and 42 deletions
|
@ -1,15 +0,0 @@
|
|||
#!/bin/bash
|
||||
cd `dirname $0`
|
||||
. ../env
|
||||
|
||||
name=Imaging-1.1.7
|
||||
rm -rf $name
|
||||
tar xzf $src/$name.tar.gz
|
||||
cd $name
|
||||
|
||||
export PATH=$prefix/bin:$PATH
|
||||
python setup.py install
|
||||
install_name_tool -change "$prefix/lib/libjpeg.62.dylib" "@rpath/libjpeg.62.dylib" $prefix/lib/python2.7/site-packages/PIL/_imaging.so
|
||||
install_name_tool -change "$prefix/lib/libz.1.dylib" "@rpath/libz.1.dylib" $prefix/lib/python2.7/site-packages/PIL/_imaging.so
|
||||
install_name_tool -change "$prefix/lib/libfreetype.6.dylib" "@rpath/libfreetype.6.dylib" $prefix/lib/python2.7/site-packages/PIL/_imagingft.so
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
cd `dirname $0`
|
||||
. ../env
|
||||
|
||||
name=Python-2.7.6
|
||||
name=Python-3.4.1
|
||||
rm -rf $name
|
||||
mkdir $name
|
||||
cd $name
|
||||
|
@ -11,4 +11,7 @@ cd $name
|
|||
$src/$name/configure \
|
||||
--prefix=$prefix
|
||||
make && make install
|
||||
install_name_tool -add_rpath @loader_path/../lib $prefix/bin/python
|
||||
install_name_tool -add_rpath @loader_path/../lib $prefix/bin/python3
|
||||
|
||||
install_name_tool -change "$prefix/lib/libz.1.dylib" "@rpath/libz.1.dylib" $prefix/lib/python3.4/lib-dynload/binascii.so
|
||||
install_name_tool -change "$prefix/lib/libz.1.dylib" "@rpath/libz.1.dylib" $prefix/lib/python3.4/lib-dynload/zlib.so
|
||||
|
|
|
@ -2,5 +2,11 @@
|
|||
cd `dirname $0`
|
||||
. ../env
|
||||
|
||||
$prefix/bin/pip install -r requirements.txt
|
||||
$prefix/bin/pip install -r ../../../openmedialibrary/requirements.txt
|
||||
export PIP_DOWNLOAD_CACHE=`pwd`/pip_cache
|
||||
|
||||
$prefix/bin/pip3 install -r ../../../openmedialibrary/requirements.txt
|
||||
$prefix/bin/pip3 install pillow
|
||||
|
||||
install_name_tool -change "$prefix/lib/libjpeg.62.dylib" "@rpath/libjpeg.62.dylib" $prefix/lib/python3.4/site-packages/PIL/_imaging.so
|
||||
install_name_tool -change "$prefix/lib/libz.1.dylib" "@rpath/libz.1.dylib" $prefix/lib/python3.4/site-packages/PIL/_imaging.so
|
||||
install_name_tool -change "$prefix/lib/libfreetype.6.dylib" "@rpath/libfreetype.6.dylib" $prefix/lib/python3.4/site-packages/PIL/_imagingft.so
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
lxml
|
|
@ -6,8 +6,4 @@ cd `dirname $0`
|
|||
./freetype/build.sh
|
||||
./Python/build.sh
|
||||
./pip/build.sh
|
||||
./PIL/build.sh
|
||||
./PythonPackages/build.sh
|
||||
|
||||
#./boost/build.sh
|
||||
#./libtorrent/build.sh
|
||||
|
|
18
make.sh
18
make.sh
|
@ -7,25 +7,21 @@ rm -rf dist
|
|||
mkdir -p dist/bin dist/lib dist/include
|
||||
|
||||
for bin in \
|
||||
python \
|
||||
python2 \
|
||||
python2.7 \
|
||||
python3 \
|
||||
python3.4 \
|
||||
; do
|
||||
cp -a bin/$bin dist/bin/$bin
|
||||
done
|
||||
|
||||
for bin in \
|
||||
easy_install \
|
||||
easy_install-2.7 \
|
||||
pip \
|
||||
pip2.7 \
|
||||
pip3 \
|
||||
; do
|
||||
sed "s/#\!.*python.*/#\!\/usr\/bin\/env python/g" bin/$bin > dist/bin/$bin
|
||||
sed "s/#\!.*python.*/#\!\/usr\/bin\/env python3/g" bin/$bin > dist/bin/$bin
|
||||
done
|
||||
|
||||
cp -a lib/python2.7 dist/lib/python2.7
|
||||
cp -a include/python2.7 dist/include/python2.7
|
||||
rm -r dist/lib/python2.7/test
|
||||
cp -a lib/python3.4 dist/lib/python3.4
|
||||
cp -a include/python3.4m dist/include/python3.4m
|
||||
rm -r dist/lib/python3.4/test
|
||||
|
||||
# libboost_system.dylib \
|
||||
# libtorrent-rasterbar.7.dylib \
|
||||
|
|
|
@ -34,17 +34,11 @@ file() {
|
|||
test -e $name || (curl -L $url > $name)
|
||||
}
|
||||
|
||||
tarball Python-2.7.6 http://python.org/ftp/python/2.7.6/Python-2.7.6.tgz
|
||||
tarball Python-3.4.1 http://python.org/ftp/python/3.4.1/Python-3.4.1.tgz
|
||||
file ez_setup.py https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
|
||||
|
||||
file zlib-1.2.8.tar.gz http://zlib.net/zlib-1.2.8.tar.gz
|
||||
file jpeg-6b.tar.gz http://optimate.dl.sourceforge.net/project/libjpeg/libjpeg/6b/jpegsrc.v6b.tar.gz
|
||||
file libpng-1.2.51.tar.gz http://dfn.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.51.tar.gz
|
||||
file freetype-2.5.0.tar.gz http://download.savannah.gnu.org/releases-redirect/freetype/freetype-2.5.0.tar.gz
|
||||
file Imaging-1.1.7.tar.gz http://effbot.org/media/downloads/Imaging-1.1.7.tar.gz
|
||||
|
||||
#file boost_1_53_0.tar.gz http://optimate.dl.sourceforge.net/project/boost/boost/1.53.0/boost_1_53_0.tar.gz
|
||||
|
||||
#git_repository libtorrent https://code.google.com/p/libtorrent/
|
||||
#file libtorrent-rasterbar-0.16.12.tar.gz https://libtorrent.googlecode.com/files/libtorrent-rasterbar-0.16.12.tar.gz
|
||||
|
||||
|
|
Loading…
Reference in a new issue