I want to - Build PIL (python imaging library) in Debug mode (win64,
AMD64)

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
extension?

Thanks



-----------



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
http://www.ijg.org/files/jpegsrc.v6b.tar.gz)

  a) Edit setup.py:
    # see http://docs.python.org/dist/module-distutils.msvccompiler.html
    os.environ['DISTUTILS_USE_SDK'] = "1"
    os.environ['MSSdk'] = "1"
    
    # see
http://www.wiredfool.com/2005/10/29/how-to-build-the-python-imaging-libr
ary-for-windows/
    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
support
    # this step was not necessary for my build, but may be for some
scenarios
    #import _tkinter
    import _tkinter_I_am_not_really_Importing_it

  b) open "Visual Studio 2005 x64 Win64 Command Prompt"

  c) build jpeg dependency:
    cd Imaging-1.1.6\jpeg-6b
    copy jconfig.vc jconfig.h
    nmake /f makefile.vc

  d) build zlib dependency
    cd Imaging-1.1.6\zlib-1.2.3
    nmake /f win32/Makefile.msc

  e) build PIL
    cd Imaging-1.1.6\
    ..\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
python25.lib),
    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  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to