Pillow/docs/build.rst

95 lines
2.8 KiB
ReStructuredText
Raw Normal View History

2014-03-22 03:52:05 +04:00
Building Pillow on Windows
==========================
.. note:: For most people, the :doc:`installation instructions
<installation>` should be sufficient
This page will describe a build setup to build Pillow against the
supported python versions in 32 and 64 bit modes, using freely
availble Microsoft compilers. This has been developed and tested
2014-04-05 04:05:42 +04:00
against 64bit Windows 7 Professional and a bare Windows Server 2012
64bit RTM version on Amazon EC2.
2014-03-22 03:52:05 +04:00
Prerequsites
------------
Extra Build Helpers
^^^^^^^^^^^^^^^^^^^
* Powershell (available by default on Windows Server)
* Github client (provides git+bash shell)
2014-04-05 04:05:42 +04:00
Optional:
* GPG (for checking signatures) (UNDONE -- python signature checking)
2014-03-22 03:52:05 +04:00
Pythons
^^^^^^^
2014-04-05 04:05:42 +04:00
The build routines expect Python to be installed at C:\PythonXX for 32
bit versions or C:\PythonXXx64 for the 64 bit versions.
2014-03-22 03:52:05 +04:00
2014-04-05 04:05:42 +04:00
Download Python 3.4.0, install it, and add it to the path. This is the
Python that we will use to bootstrap the build process. (The download
routines are using 3.2+ features, and installing 3.4 gives us pip and
virtualenv as well, reducing the number of packages that we need to
install.)
2014-03-22 03:52:05 +04:00
2014-04-05 04:05:42 +04:00
Download the rest of the pythons by opening a command window, changing
to the `winbuild` directory, and running `python
get_pythons.py`.
2014-03-22 03:52:05 +04:00
2014-04-05 04:05:42 +04:00
UNDONE -- gpg verify the signatures (note that we can download from
https)
2014-03-22 03:52:05 +04:00
2014-04-05 04:05:42 +04:00
Run each installer and set the proper path to the installation. Don't
set any of them as the default python, or add them to the path.
2014-03-22 03:52:05 +04:00
2014-03-25 20:00:41 +04:00
2014-03-22 03:52:05 +04:00
Compilers
^^^^^^^^^
Download and install:
* `Microsoft Windows SDK for Windows 7 and .NET Framework 3.5
SP1 <http://www.microsoft.com/en-us/download/details.aspx?id=3138>`_
* `Microsoft Windows SDK for Windows 7 and .NET Framework
4 <http://www.microsoft.com/en-us/download/details.aspx?id=8279>`_
* `CMake-2.8.10.2-win32-x86.exe <http://www.cmake.org/cmake/resources/software.html>`_
The samples and the .NET SDK portions aren't required, just the
compilers and other tools. UNDONE -- check exact wording.
Dependencies
------------
2014-04-05 04:05:42 +04:00
The script 'build_dep.py' downloads and builds the dependencies. Open
a command window, change directory into `winbuild` and run `python
build_dep.py`.
2014-03-22 03:52:05 +04:00
This will download libjpeg, libtiff, libz, and freetype. It will then
compile 32 and 64 bit versions of the libraries, with both versions of
the compilers.
UNDONE -- lcms fails.
2014-04-05 04:05:42 +04:00
UNDONE -- webp, jpeg2k not recognized
2014-03-22 03:52:05 +04:00
2014-04-05 04:05:42 +04:00
Building Pillow
---------------
Once the dependencies are built, run `python build.py --clean` to
build and install Pillow in virtualenvs for each python
build. `build.py --dist` will build windows installers instead of
installing into virtualenvs.
UNDONE -- suppressed output, what about failures.
Testing Pillow
2014-03-22 03:52:05 +04:00
--------------
2014-04-05 04:05:42 +04:00
Build and install Pillow, then run `python test.py` from the
`winbuild` directory.
2014-03-22 03:52:05 +04:00