I want to - Build PIL (python imaging library) in Debug mode (win64,
I built python2.5.1 using visual studios (for win64, AMD64)
(python_d.exe, etc). For other extension modules, such as ctypes, I
just ran "python_d.exe setup.py", and setup.py automatically chose to
build ctypes_d.pyd (in debug mode).
But for PIL, I ran "python_d.exe setup.py", and it still tries to build
_imgaging.pyd (not _imaging_d.pyd - debug). It looks for python25.lib
(instead of python25_d.lib).
How can I tell PIL to build me a python debug extension (using my custom
build of python2.5.1 debug python_d.exe) instead of a python release
4) build Python Imaging Library (for "import PIL")
* our source has unmodified zlib123 (zlib 1.2.3) (from
http://www.zlib.net/) source (for zip / png support)
* our source has unmodified ijg jpeg library (for jpeg support) (from
a) Edit setup.py:
# see http://docs.python.org/dist/module-distutils.msvccompiler.html
os.environ['DISTUTILS_USE_SDK'] = "1"
os.environ['MSSdk'] = "1"
FREETYPE_ROOT = None
JPEG_ROOT = "jpeg-6b"
TIFF_ROOT = None
ZLIB_ROOT = "zlib-1.2.3"
TCL_ROOT = None
# ignore tkinter support since it wasn't working and I just want png
# this step was not necessary for my build, but may be for some
b) open "Visual Studio 2005 x64 Win64 Command Prompt"
c) build jpeg dependency:
copy jconfig.vc jconfig.h
nmake /f makefile.vc
d) build zlib dependency
nmake /f win32/Makefile.msc
e) build PIL
..\Build_Win64\python.exe setup.py build
TODO: - paths???
Again, getting setup.py to build was messy b/c I wasn't sure how to
tell setup.py where to look for the missing files (python .h files and
so I copied them to local folders in the PIL build - to hack the
build to work
* copied headers (Python-2.5.1\Include\*.h)
(Python-2.5.1\PC\pyconfig.h) to (Imaging1.1.6\libImaging)
* copied python25.lib to Imaging1.1.6\
Image-SIG maillist - [email protected]