libvips/python/README.md

36 lines
1.1 KiB
Markdown
Raw Normal View History

2014-12-10 16:31:22 +01:00
# vips8 binding for Python
This overrides file adds a few small helper functions to the
2014-12-18 11:25:42 +01:00
gobject-introspection binding for libvips. It has been tested with python2.7
and python3.4 and may work for other versions.
## Documentation
2014-12-10 16:31:22 +01:00
There's a chapter in the libvips API docs on these overrides, see "Using
libvips from Python".
2014-12-10 18:02:51 +01:00
vips-x.y.z/test has a test suite. Again, the test suite works with python2.7
and python3.4.
2014-12-10 16:31:22 +01:00
2014-12-18 11:25:42 +01:00
## Install
`libvips` need to be built and installed.
The libvips typelib, `Vips-8.0.typelib`, needs to be on your `GI_TYPELIB_PATH`. It is typically installed somewhere like `/usr/local/lib/girepository-1.0`
You need `pygobject-3.0`. To confirm that it's installed, check that your
Python `dist-packages` area has a directory called `gi`. For example:
ls /usr/lib/python2.7/dist-packages/gi
`Vips.py` needs to be in the overrides directory of your gobject-introspection
2014-12-10 16:31:22 +01:00
pygobject area, for example:
sudo cp Vips.py /usr/lib/python2.7/dist-packages/gi/overrides
2014-12-10 18:02:51 +01:00
or
2014-12-15 12:57:35 +01:00
sudo cp Vips.py /usr/lib/python3/dist-packages/gi/overrides
2014-12-10 18:02:51 +01:00
2014-12-18 11:25:42 +01:00
You can optionally pre-compile this file for a small speedup.