[Image-SIG] How to tell Pillow where to look for header files (on OS X)?
Mark Sienkiewicz
sienkiew at stsci.edu
Fri Mar 15 22:24:39 CET 2013
On 03/15/13 16:44, Felix Schwarz wrote:
> Hey,
>
> how can I specify the include dir for header files (jpeglib.h) for Pillow
> without modifying the source?
There are parameters for setup.py to specify where the include files and library files are. The interface is a bit klunky, but it worked like this for me:
build_ext means to build the C extensions; this command recognizes -I for another directory of include files and -L for another directory of library files
python setup.py build_ext -I ~/homebrew/include -L ~/homebrew/lib
build means to do both the python and the C extension, but distutils recognizes that the C extension is built already, so you don't need to specify -I/-L -- a good thing, because it doesn't recognize them!
python setup.py build
install copies the build files to the install directory; the above commands did all of the build steps
python setup.py install
There are options to specify a specific directory to install in. I usually use:
python setup.py install --home ~/py
to get ~/py/bin (add to PATH) and ~/py/lib/python (add to PYTHONPATH).
Regards,
Mark S.
More information about the Image-SIG
mailing list