1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
.. _dev-building-on-windows:
.. module:: pywt
.. include:: ../substitutions.rst
===================
Building on Windows
===================
Prepare build environment
~~~~~~~~~~~~~~~~~~~~~~~~~
To start developing |pywt| code on Windows you will have to prepare build
environment first. This will include installing a couple components like
Python, MinGW C compiler, Cython, Numpy and Sphinx.
Install Python
~~~~~~~~~~~~~~
Go to the Python download site http://python.org/download/ and get
the recent 2.x Python for Windows version (Python 2.6 recommended).
Install it.
Install MinGW C compiler
~~~~~~~~~~~~~~~~~~~~~~~~
Take a look at http://www.mingw.org/wiki/Getting_Started
and http://www.mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite.
Follow the instructions there to set up the compiler.
You can also take a look at Cython's "Installing MinGW on Windows"
page at http://docs.cython.org/src/tutorial/appendix.html.
Configure Distutils
~~~~~~~~~~~~~~~~~~~
Distutils is a standard Python build system. By default it relies
on Microsoft Visual C compiler, but it is recommended to use
MinGW GCC compiler instead (|pywt| is developed and tested using GCC).
In order to change the settings and use MinGW as the default compiler,
edit or create a Distutils configuration file
``c:\Python26\Lib\distutils\distutils.cfg`` and place the following
entry in it::
[build]
compiler = mingw32
Install Cython
~~~~~~~~~~~~~~
Instructions on installing recent Cython version are
on http://docs.cython.org/src/quickstart/install.html.
Install Numpy
~~~~~~~~~~~~~
Fetch and install a recent Numpy binary
from http://new.scipy.org/download.html.
Install Sphinx
~~~~~~~~~~~~~~
Sphinx is a documentation tool that convert reStructuredText files into
nice looking html documentation. It is only required to rebuild |pywt|
documentation, not the package itself.
Get Sphinx from the Python Package Index (http://pypi.python.org/pypi/Sphinx),
or install it with::
easy_install -U Sphinx
Ready to go
~~~~~~~~~~~
At this point you should be ready to go. Open command line and go to
|pywt| source code directory.
To build the project issue::
python setup.py build
To install::
python setup.py install
To build docs::
cd doc
doc2html.bat
To run some tests::
cd tests
python test_regression.py
python test_doc.py
python test_perfect_reconstruction.py
|