switch to python3

This commit is contained in:
j 2014-09-30 18:45:12 +02:00
parent 752f00a656
commit 8895f9bf17
7 changed files with 21 additions and 42 deletions

View file

@ -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

View file

@ -2,7 +2,7 @@
cd `dirname $0` cd `dirname $0`
. ../env . ../env
name=Python-2.7.6 name=Python-3.4.1
rm -rf $name rm -rf $name
mkdir $name mkdir $name
cd $name cd $name
@ -11,4 +11,7 @@ cd $name
$src/$name/configure \ $src/$name/configure \
--prefix=$prefix --prefix=$prefix
make && make install 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

View file

@ -2,5 +2,11 @@
cd `dirname $0` cd `dirname $0`
. ../env . ../env
$prefix/bin/pip install -r requirements.txt export PIP_DOWNLOAD_CACHE=`pwd`/pip_cache
$prefix/bin/pip install -r ../../../openmedialibrary/requirements.txt
$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

View file

@ -1 +0,0 @@
lxml

View file

@ -6,8 +6,4 @@ cd `dirname $0`
./freetype/build.sh ./freetype/build.sh
./Python/build.sh ./Python/build.sh
./pip/build.sh ./pip/build.sh
./PIL/build.sh
./PythonPackages/build.sh ./PythonPackages/build.sh
#./boost/build.sh
#./libtorrent/build.sh

18
make.sh
View file

@ -7,25 +7,21 @@ rm -rf dist
mkdir -p dist/bin dist/lib dist/include mkdir -p dist/bin dist/lib dist/include
for bin in \ for bin in \
python \ python3 \
python2 \ python3.4 \
python2.7 \
; do ; do
cp -a bin/$bin dist/bin/$bin cp -a bin/$bin dist/bin/$bin
done done
for bin in \ for bin in \
easy_install \ pip3 \
easy_install-2.7 \
pip \
pip2.7 \
; do ; 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 done
cp -a lib/python2.7 dist/lib/python2.7 cp -a lib/python3.4 dist/lib/python3.4
cp -a include/python2.7 dist/include/python2.7 cp -a include/python3.4m dist/include/python3.4m
rm -r dist/lib/python2.7/test rm -r dist/lib/python3.4/test
# libboost_system.dylib \ # libboost_system.dylib \
# libtorrent-rasterbar.7.dylib \ # libtorrent-rasterbar.7.dylib \

View file

@ -34,17 +34,11 @@ file() {
test -e $name || (curl -L $url > $name) 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 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 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 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 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 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