replace PYTHON_VERSION with IOS_PYTHON_VERSION, and factorize HOSTPYTHON into environment.sh. closes #27
This commit is contained in:
parent
ad85ed15f0
commit
d0eacfc3ae
7 changed files with 16 additions and 18 deletions
|
@ -21,7 +21,6 @@ export LDFLAGS="$ARM_LDFLAGS"
|
||||||
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
||||||
|
|
||||||
try pushd $TMPROOT/audiostream-master
|
try pushd $TMPROOT/audiostream-master
|
||||||
HOSTPYTHON=$TMPROOT/Python-$PYTHON_VERSION/hostpython
|
|
||||||
$HOSTPYTHON setup.py build_ext &>/dev/null
|
$HOSTPYTHON setup.py build_ext &>/dev/null
|
||||||
try find . -iname '*.pyx' -exec $KIVYIOSROOT/tools/cythonize.py {} \;
|
try find . -iname '*.pyx' -exec $KIVYIOSROOT/tools/cythonize.py {} \;
|
||||||
try $HOSTPYTHON setup.py build_ext
|
try $HOSTPYTHON setup.py build_ext
|
||||||
|
|
|
@ -12,7 +12,6 @@ export LDFLAGS="$ARM_LDFLAGS"
|
||||||
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
||||||
|
|
||||||
try pushd $KIVYIOSROOT/src/ios
|
try pushd $KIVYIOSROOT/src/ios
|
||||||
HOSTPYTHON=$TMPROOT/Python-$PYTHON_VERSION/hostpython
|
|
||||||
try $KIVYIOSROOT/tools/cythonize.py *.pyx
|
try $KIVYIOSROOT/tools/cythonize.py *.pyx
|
||||||
try $HOSTPYTHON setup.py build_ext
|
try $HOSTPYTHON setup.py build_ext
|
||||||
try $HOSTPYTHON setup.py install -O2 --root iosbuild
|
try $HOSTPYTHON setup.py install -O2 --root iosbuild
|
||||||
|
|
|
@ -22,14 +22,14 @@ OLD_LDSHARED="$LDSHARED"
|
||||||
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
||||||
export CFLAGS="$ARM_CFLAGS"
|
export CFLAGS="$ARM_CFLAGS"
|
||||||
|
|
||||||
ln -s $KIVYIOSROOT/Python-$PYTHON_VERSION/python
|
ln -s $KIVYIOSROOT/Python-$IOS_PYTHON_VERSION/python
|
||||||
ln -s $KIVYIOSROOT/Python-$PYTHON_VERSION/python.exe
|
ln -s $KIVYIOSROOT/Python-$IOS_PYTHON_VERSION/python.exe
|
||||||
|
|
||||||
rm -rdf iosbuild/
|
rm -rdf iosbuild/
|
||||||
try mkdir iosbuild
|
try mkdir iosbuild
|
||||||
|
|
||||||
echo "First build ========================================"
|
echo "First build ========================================"
|
||||||
HOSTPYTHON=$TMPROOT/Python-$PYTHON_VERSION/hostpython
|
HOSTPYTHON=$TMPROOT/Python-$IOS_PYTHON_VERSION/hostpython
|
||||||
$HOSTPYTHON setup.py build_ext -g
|
$HOSTPYTHON setup.py build_ext -g
|
||||||
echo "cythoning =========================================="
|
echo "cythoning =========================================="
|
||||||
find . -name *.pyx -exec $KIVYIOSROOT/tools/cythonize.py {} \;
|
find . -name *.pyx -exec $KIVYIOSROOT/tools/cythonize.py {} \;
|
||||||
|
|
|
@ -97,7 +97,6 @@ export LDFLAGS="$ARM_LDFLAGS -L$PREFIX/lib"
|
||||||
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
export LDSHARED="$KIVYIOSROOT/tools/liblink"
|
||||||
|
|
||||||
pushd $TMPROOT/lxml-$LXML_VERSION
|
pushd $TMPROOT/lxml-$LXML_VERSION
|
||||||
HOSTPYTHON=$TMPROOT/Python-$PYTHON_VERSION/hostpython
|
|
||||||
XML2_CONFIG=$PREFIX/bin/xml2-config
|
XML2_CONFIG=$PREFIX/bin/xml2-config
|
||||||
XSLT_CONFIG=$PREFIX/bin/xslt-config
|
XSLT_CONFIG=$PREFIX/bin/xslt-config
|
||||||
|
|
||||||
|
|
|
@ -7,20 +7,20 @@
|
||||||
# http://latenitesoft.blogspot.com/2008/10/iphone-programming-tips-building-unix.html
|
# http://latenitesoft.blogspot.com/2008/10/iphone-programming-tips-building-unix.html
|
||||||
|
|
||||||
# download python and patch if they aren't there
|
# download python and patch if they aren't there
|
||||||
if [ ! -f $CACHEROOT/Python-$PYTHON_VERSION.tar.bz2 ]; then
|
if [ ! -f $CACHEROOT/Python-$IOS_PYTHON_VERSION.tar.bz2 ]; then
|
||||||
curl http://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.bz2 > $CACHEROOT/Python-$PYTHON_VERSION.tar.bz2
|
curl http://www.python.org/ftp/python/$IOS_PYTHON_VERSION/Python-$IOS_PYTHON_VERSION.tar.bz2 > $CACHEROOT/Python-$IOS_PYTHON_VERSION.tar.bz2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# get rid of old build
|
# get rid of old build
|
||||||
rm -rf $TMPROOT/Python-$PYTHON_VERSION
|
rm -rf $TMPROOT/Python-$IOS_PYTHON_VERSION
|
||||||
try tar -xjf $CACHEROOT/Python-$PYTHON_VERSION.tar.bz2
|
try tar -xjf $CACHEROOT/Python-$IOS_PYTHON_VERSION.tar.bz2
|
||||||
try mv Python-$PYTHON_VERSION $TMPROOT
|
try mv Python-$IOS_PYTHON_VERSION $TMPROOT
|
||||||
try pushd $TMPROOT/Python-$PYTHON_VERSION
|
try pushd $TMPROOT/Python-$IOS_PYTHON_VERSION
|
||||||
|
|
||||||
# Patch Python for temporary reduce PY_SSIZE_T_MAX otherzise, splitting string doesnet work
|
# Patch Python for temporary reduce PY_SSIZE_T_MAX otherzise, splitting string doesnet work
|
||||||
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$PYTHON_VERSION-ssize-t-max.patch
|
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$IOS_PYTHON_VERSION-ssize-t-max.patch
|
||||||
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$PYTHON_VERSION-dynload.patch
|
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$IOS_PYTHON_VERSION-dynload.patch
|
||||||
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$PYTHON_VERSION-static-_sqlite3.patch
|
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$IOS_PYTHON_VERSION-static-_sqlite3.patch
|
||||||
|
|
||||||
# Copy our setup for modules
|
# Copy our setup for modules
|
||||||
try cp $KIVYIOSROOT/src/python_files/ModulesSetup Modules/Setup.local
|
try cp $KIVYIOSROOT/src/python_files/ModulesSetup Modules/Setup.local
|
||||||
|
@ -37,7 +37,7 @@ try make distclean
|
||||||
echo "Building for iOS ======================================================="
|
echo "Building for iOS ======================================================="
|
||||||
|
|
||||||
# patch python to cross-compile
|
# patch python to cross-compile
|
||||||
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$PYTHON_VERSION-xcompile.patch
|
try patch -p1 < $KIVYIOSROOT/src/python_files/Python-$IOS_PYTHON_VERSION-xcompile.patch
|
||||||
|
|
||||||
# set up environment variables for cross compilation
|
# set up environment variables for cross compilation
|
||||||
export CPPFLAGS="-I$IOSSDKROOT/usr/lib/gcc/arm-apple-darwin11/4.2.1/include/ -I$IOSSDKROOT/usr/include/"
|
export CPPFLAGS="-I$IOSSDKROOT/usr/lib/gcc/arm-apple-darwin11/4.2.1/include/ -I$IOSSDKROOT/usr/include/"
|
||||||
|
|
|
@ -24,7 +24,7 @@ if [ ! -d $DEVROOT ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# version of packages
|
# version of packages
|
||||||
export PYTHON_VERSION=2.7.1
|
export IOS_PYTHON_VERSION=2.7.1
|
||||||
export SDLTTF_VERSION=2.0.10
|
export SDLTTF_VERSION=2.0.10
|
||||||
export FT_VERSION=2.4.8
|
export FT_VERSION=2.4.8
|
||||||
export XML2_VERSION=2.7.8
|
export XML2_VERSION=2.7.8
|
||||||
|
@ -44,6 +44,7 @@ export PKG_CONFIG_PATH="$BUILDROOT/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
|
|
||||||
# some tools
|
# some tools
|
||||||
export CCACHE=$(which ccache)
|
export CCACHE=$(which ccache)
|
||||||
|
export HOSTPYTHON="$TMPROOT/Python-$IOS_PYTHON_VERSION/hostpython"
|
||||||
for fn in cython-2.7 cython; do
|
for fn in cython-2.7 cython; do
|
||||||
export CYTHON=$(which $fn)
|
export CYTHON=$(which $fn)
|
||||||
if [ "X$CYTHON" != "X" ]; then
|
if [ "X$CYTHON" != "X" ]; then
|
||||||
|
|
|
@ -29,7 +29,7 @@ echo "-> Synchronize source code"
|
||||||
try rsync -av --delete $SRCDIR/ $YOURAPPDIR
|
try rsync -av --delete $SRCDIR/ $YOURAPPDIR
|
||||||
|
|
||||||
echo "-> Compile to pyo"
|
echo "-> Compile to pyo"
|
||||||
$TMPROOT/Python-$PYTHON_VERSION/hostpython -OO -m compileall $YOURAPPDIR
|
$HOSTPYTHON -OO -m compileall $YOURAPPDIR
|
||||||
|
|
||||||
echo "-> Remove unused files (pyc, py)"
|
echo "-> Remove unused files (pyc, py)"
|
||||||
find $YOURAPPDIR -iname '*.py' -exec rm {} \;
|
find $YOURAPPDIR -iname '*.py' -exec rm {} \;
|
||||||
|
|
Loading…
Reference in a new issue