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.
_______________________________________________
Image-SIG maillist - Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig