Monday, December 9, 2013

Compiling Spyder2

Spyder (previously known as Pydee) is a powerful interactive development environment for the Python language with advanced editing, interactive testing, debugging and introspection feature.

Set the environment.

Update the environment in c:/msys/etc/profile:
export CFLAGS="-Ic:/programs/dev/python64/include -Ic:/programs/python27/include/python2.7"
export LDFLAGS="-Lc:/programs/dev/python64/lib -Lc:/programs/python27/lib"
export PATH="$PATH:/c/programs/python27/bin:/c/programs/dev/python64/bin:/c/programs/tools/bin"
export TERMINFO="c:/programs/python27/share/terminfo"
export lt_cv_deplibs_check_method="pass_all"


Install Python.

Extract Python-2.7.*-*-mingw-x86_64.7z to your Python installation dir, for example; 'c:/programs/python27'.

Compile extra dependencies.

freetype-2.4.12
http://sourceforge.net/projects/freetype/files/freetype2/2.4.12/freetype-2.4.12.tar.bz2/download

cd freetype-2.4.12
./configure --prefix=c:/programs/dev/python64 --build=x86_64-w64-mingw32 --disable-shared
make -j2
make install



tiff-4.0.3
http://download.osgeo.org/libtiff/tiff-4.0.3.tar.gz

cd tiff-4.0.3
./configure --prefix=c:/programs/dev/python64 --build=x86_64-w64-mingw32 --disable-cxx --disable-shared
cd port && make
cd ../libtiff
make -j2
make install



jpeg-9
http://www.ijg.org/files/jpegsrc.v9.tar.gz

cd jpeg-9
./configure --prefix=c:/programs/dev/python64 --build=x86_64-w64-mingw32 --disable-shared
make -j2
make install



giflib-5.0.5
http://sourceforge.net/projects/giflib/files/giflib-5.x/giflib-5.0.5.tar.bz2/download

cd giflib-5.0.5
./configure --prefix=c:/programs/dev/python64 --build=x86_64-w64-mingw32 --disable-shared
make -j2
make install



zlib-1.2.8
http://zlib.net/zlib-1.2.8.tar.xz
patch: zlib-1.2.8_disable_shared.diff

cd zlib-1.2.8
patch -p1 <../zlib-1.2.8_disable_shared.diff

make prefix=c:/programs/dev/python64 -f win32/Makefile.gcc install


lcms-1.19
http://sourceforge.net/projects/lcms/files/lcms/1.19/lcms-1.19.tar.gz/download
patch: lcms-1.19_mingw.diff

cd lcms-1.19

patch -p1 <../lcms-1.19_mingw.diff
 ./configure --prefix=c:/programs/dev/python64 --build=x86_64-w64-mingw32 --disable-shared
make -j2
make install



libwebp-0.3.1
https://webp.googlecode.com/files/libwebp-0.3.1.tar.gz

cd libwebp-0.3.1
./configure --prefix=c:/programs/dev/python64 --build=x86_64-w64-mingw32 --enable-libwebpmux --enable-libwebpdemux --disable-shared
make -j2
make install


Compile extra Python modules.

setuptools-1.3
https://pypi.python.org/packages/source/s/setuptools/setuptools-1.3.tar.gz

cd setuptools-1.3
python setup.py build install



pip-1.4.1
https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz

cd pip-1.4.1
python setup.py build install



scons-2.3.0
https://pypi.python.org/packages/source/S/SCons/SCons-2.3.0.tar.gz
patch: scons-2.3.0_mingw-python.diff

cd scons-2.3.0

patch -p1 <../scons-2.3.0_mingw-python.diff 
python setup.py build install --no-install-bat --no-version-script


pyflakes-0.7.2
https://pypi.python.org/packages/source/p/pyflakes/pyflakes-0.7.2.tar.gz

cd pyflakes-0.7.2
python setup.py build install



Pillow-2.2.1
https://pypi.python.org/packages/source/P/Pillow/Pillow-2.2.1.zip
patch: Pillow-2.2.1_mingw-python.diff

cd Pillow-2.2.1

patch -p1 <../Pillow-2.2.1_mingw-python.diff
python setup.py build install0


[ pylint & dependencies ]

colorama-0.2.5
https://pypi.python.org/packages/source/c/colorama/colorama-0.2.5.tar.gz

cd colorama-0.2.5
python setup.py build install



logilab-common-0.60.0
https://pypi.python.org/packages/source/l/logilab-common/logilab-common-0.60.0.tar.gz

cd logilab-common-0.60.0
python setup.py build install



logilab-astng-0.24.3
https://pypi.python.org/packages/source/l/logilab-astng/logilab-astng-0.24.3.tar.gz

cd logilab-astng-0.24.3
python setup.py build install



pylint-0.28.0
https://pypi.python.org/packages/source/p/pylint/pylint-0.28.0.tar.gz

cd pylint-0.28.0
python setup.py build install


[ end pylint ]


rope-0.9.4
https://pypi.python.org/packages/source/r/rope/rope-0.9.4.tar.gz

cd rope-0.9.4
python setup.py build install



zeromq-3.2.2
http://download.zeromq.org/zeromq-3.2.2.tar.gz
patch: zeromq-3.2.2_mingw_static.diff

cd zeromq-3.2.2

patch -p1 <../zeromq-3.2.2_mingw_static.diff
./configure --prefix=c:/programs/dev/python64 --build=x86_64-w64-mingw32 --enable-static --disable-shared
make
make install



pyzmq-13.1.0
https://pypi.python.org/packages/source/p/pyzmq/pyzmq-13.1.0.tar.gz
patch: pyzmq-13.1.0_mingw-python.diff

cd pyzmq-13.1.0

patch -p1 <../pyzmq-13.1.0_mingw-python.diff 
python setup.py build --zmq=c:/programs/dev/python64 install


Pygments-1.6
https://pypi.python.org/packages/source/P/Pygments/Pygments-1.6.tar.gz

cd Pygments-1.6
python setup.py build install



pep8-1.4.6
https://pypi.python.org/packages/source/P/Pygments/Pygments-1.6.tar.gz

cd pep8-1.4.6
python setup.py build install



sympy-0.7.3
https://pypi.python.org/packages/source/s/sympy/sympy-0.7.3-py2.7.tar.gz

cd sympy-0.7.3
python setup.py build install



[ sphinx & dependencies ]

docutils-0.11
https://pypi.python.org/packages/source/d/docutils/docutils-0.11.tar.gz

cd docutils-0.11
python setup.py build install



Jinja2-2.6
https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.6.tar.gz

cd Jinja2-2.6
python setup.py build install



Sphinx-1.1.3
https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.1.3.tar.gz

cd Sphinx-1.1.3
python setup.py build install


[ end sphinx ]

psutil-1.1.2
https://pypi.python.org/packages/source/p/psutil/psutil-1.1.2.tar.gz
patch: psutil-1.1.2_mingw-python.diff

cd psutil-1.1.2

patch -p1 <../psutil-1.1.2_mingw-python.diff
python setup.py build install


tornado-3.1.1
https://pypi.python.org/packages/source/t/tornado/tornado-3.1.1.tar.gz

cd tornado-3.1.1
 
python setup.py build install


ipython-1.1.0
https://pypi.python.org/packages/source/i/ipython/ipython-1.1.0.tar.gz
patch: ipython-1.1.0_mingw-python.diff

cd ipython-1.1.0

patch -p1 <../ipython-1.1.0_mingw-python.diff
python setup.py build install




For NumPy, SciPy and Matplotlib refer to this previous article.

numpy-1.8.0
scipy-0.13.0
qt-4.8.4
sip-4.15.2
PyQt-win-gpl-4.10.3
matplotlib-1.3.1



numexpr-2.1
https://pypi.python.org/packages/source/n/numexpr/numexpr-2.1.tar.gz

cd numexpr-2.1
python setup.py build install



Compile Spyder2.

spyder-2.2.5
https://spyderlib.googlecode.com/files/spyder-2.2.5.zip
patch: spyder-2.2.5_mingw-python.diff

cd spyder-2.2.5

patch -p1 <../spyder-2.2.5_mingw-python.diff 
python setup.py build install