Files
keystone-engine-keystone/bindings/python
hongxu 5bcff118bb fix python bindings shared library directory issue (#301)
using `data_files` dict prefixed with
`SITE_PACKAGES = os.path.join(get_python_lib(), "keystone")` is not
portable, see #235 and #297 for details. Regular setup configuration does
not work, e.g., specifying `package_data` etc, since that only affects
`sdist`.

The fix is a hack: customize `install_lib` to explicitly copy the file
into keystone install dir.
2017-10-24 09:41:53 +08:00
..
2016-04-28 21:06:49 +08:00
2016-04-28 21:06:49 +08:00
2016-04-28 21:06:49 +08:00
2016-07-28 04:30:46 +08:00
2016-07-27 00:27:49 +08:00
2016-07-28 04:30:46 +08:00

This documentation explains how to install Python binding for Keystone from source.

  1. Install the core engine as dependency

    Follow README.md in the root directory to compile & install the core.

  2. To install pure Python binding on *nix, run the command below in the Python bindings directory:

     $ sudo make install
    

To install Python3 binding package, run the command below: (Note: this requires python3 installed in your machine)

    $ sudo make install3

For example how to use Keystone API, see sample.py

  1. To install Python binding on Windows:

Run the following command in command prompt:

    C:\> C:\location_to_python\python.exe setup.py install

Next, copy all the DLL files from the 'Core engine for Windows' package available on the same Keystone download page and paste it in the path:

    C:\location_to_python\Lib\site-packages\keystone\